* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #1abc9c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
}

body {
    background: linear-gradient(135deg, #1a2a3a, #2c3e50);
    color: var(--light);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i {
    font-size: 1.3rem;
}

.location-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.location-input input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--light);
    font-size: 1rem;
}

.location-input input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.location-input button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--secondary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-input button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.location-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.location-btn {
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.location-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.location-btn.active {
    background: var(--accent);
    color: var(--dark);
    font-weight: 600;
}

.tide-chart-container {
    height: 250px;
    margin: 20px 0;
    position: relative;
}

.tide-chart {
    height: 100%;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 0;
}

.tide-bar {
    flex: 1;
    background: linear-gradient(to top, var(--secondary), var(--accent));
    border-radius: 5px 5px 0 0;
    position: relative;
    transition: all 0.3s ease;
}

.tide-bar:hover {
    transform: scaleY(1.05);
}

.tide-bar.high {
    background: linear-gradient(to top, var(--warning), var(--danger));
}

.tide-bar-label {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.tide-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.info-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.info-box h3 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--accent);
}

.info-box p {
    font-size: 1.2rem;
    font-weight: 600;
}

.tide-forecast {
    margin-top: 20px;
}

.forecast-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.forecast-item:last-child {
    border-bottom: none;
}

.forecast-time {
    font-weight: 600;
}

.forecast-height {
    color: var(--accent);
    font-weight: 600;
}

.forecast-type {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    background: var(--secondary);
}

.forecast-type.high {
    background: var(--danger);
}

.tide-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-box h3 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--accent);
}

.stat-box p {
    font-size: 1.2rem;
    font-weight: 600;
}

.moon-phase {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.moon-icon {
    font-size: 2rem;
    color: var(--light);
}

.moon-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--accent);
}

.moon-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading i {
    font-size: 2rem;
    color: var(--accent);
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.current-time {
    text-align: center;
    margin: 10px 0;
    font-size: 1.1rem;
    color: var(--accent);
}

.map-container {
    height: 300px;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
}

.error-message {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--danger);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.api-info {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 10px;
    text-align: center;
}