:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #38bdf8;
    --secondary: #818cf8;
    --accent: #f472b6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(30, 41, 59, 0.8);

    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(244, 114, 182, 0.1) 0%, transparent 40%);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Glassmorphism Utilities */
.glass-header,
.glass-card,
.glass-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Header */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.glass-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo i {
    -webkit-text-fill-color: var(--primary);
}

.date-display {
    font-weight: 300;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Hero */
.hero {
    padding: 4rem 0 2rem;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Current Conditions Card */
.current-conditions {
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 4rem;
    text-align: left;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.condition-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.condition-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.condition-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.condition-value.highlight {
    color: var(--primary);
}

/* Forecast Section */
.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.forecast-card {
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.forecast-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    border-color: rgba(56, 189, 248, 0.3);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.day-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.weather-icon {
    font-size: 1.5rem;
    color: var(--accent);
}

.forecast-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: var(--text-muted);
}

.detail-val {
    font-weight: 600;
}

/* Chart Section */
.chart-section {
    margin-bottom: 4rem;
}

.chart-container {
    padding: 1.5rem;
    border-radius: 24px;
    height: 300px;
    position: relative;
}

.victory-banner {
    margin-top: 2rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    animation: pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Tides Section */
.tides-section {
    margin-bottom: 4rem;
}

.tides-container {
    border-radius: 24px;
    padding: 2rem;
    overflow-x: auto;
}

.tide-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.tide-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    border-bottom: 1px solid var(--glass-border);
}

.tide-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tide-table tr:last-child td {
    border-bottom: none;
}

.tide-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tide-high {
    background: rgba(56, 189, 248, 0.2);
    color: var(--primary);
}

.tide-low {
    background: rgba(244, 114, 182, 0.2);
    color: var(--accent);
}

/* Feedback Section */
.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.feedback-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.vote-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.feedback-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.feedback-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: scale(1.1);
}

/* Footer */
.glass-footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .glass-header {
        position: static;
    }

    .hero-title {
        font-size: 3rem;
    }

    .summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero,
.forecast-card,
.tides-container,
.current-conditions {
    animation: fadeIn 0.8s ease-out forwards;
}

.forecast-card:nth-child(1) {
    animation-delay: 0.1s;
}

.forecast-card:nth-child(2) {
    animation-delay: 0.2s;
}

.forecast-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Welcome Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeInOverlay 0.3s ease-out;
    overflow-y: auto;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border: 2px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
    position: relative;
    margin: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.25rem;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-close:active {
    transform: rotate(90deg) scale(0.95);
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-notice {
    background: rgba(56, 189, 248, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.modal-notice-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-text {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-btn {
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: white;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.modal-btn:active {
    transform: translateY(0);
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .modal-content {
        padding: 2rem 1.25rem;
        max-height: 85vh;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        top: 0.75rem;
        right: 0.75rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-btn {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}