/* ====== ROOT & RESET ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

/* Mobile-first: Use 14px for small screens */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

/* ====== BODY LAYOUT ====== */
body {
    background: url(./assets/sitebg.png);
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    font-family: 'Comic Sans MS', 'Arial Black', sans-serif;
    min-height: 100vh;
}

/* ====== NAVIGATION ====== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease-in-out;
    padding: 0.5rem;
}

.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0.5rem;
    transition: all 0.3s ease-in-out;
}

.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo img {
    max-width: 60px;
    height: auto;
    display: block;
}

.logo a {
    text-decoration: none;
}

/* Mobile hamburger menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Desktop navigation */
.nav ul {
    display: flex;
    list-style-type: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease-in-out;
    color: gray;
    display: block;
}

.nav a:hover {
    color: white;
}

.nav button {
    padding: 0.6rem 1rem;
    border: 2px solid gray;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-weight: 900;
    font-size: 0.9rem;
    font-family: 'Comic Sans MS', 'Arial Black', sans-serif;
    color: white;
    transition: all 0.2s;
    border-radius: 4px;
    white-space: nowrap;
}

.nav button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.nav button:active {
    transform: scale(0.95);
}

/* ====== MOBILE NAVIGATION ====== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav ul.active {
        max-height: 500px;
        border-top: 2px solid rgba(255, 255, 255, 0.2);
    }

    .nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav a {
        padding: 1rem;
        display: block;
    }

    .nav button {
        width: 100%;
        border-radius: 0;
        border: none;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* ====== MAIN CONTENT AREA ====== */
.background {
    width: 100%;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px 100px;
    min-height: 100vh;
}

.slider-title {
    font-size: clamp(1.5rem, 8vw, 4rem);
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: clamp(1rem, 5vw, 1.5rem);
    margin-bottom: 2rem;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* ====== SLIDER ====== */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    aspect-ratio: 16 / 10;
}

.slider {
    display: flex;
    transition: transform 0.4s ease-in-out;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Navigation buttons */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    font-size: 1.2rem;
    touch-action: manipulation;
}

@media (max-width: 480px) {
    .prev, .next {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev:active, .next:active {
    transform: translateY(-50%) scale(0.95);
}

/* Dots container */
.dots-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dot {
    height: 12px;
    width: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

@media (max-width: 480px) {
    .dot {
        height: 10px;
        width: 10px;
    }
}

.dot.active {
    background-color: rgba(255, 255, 255, 1);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* ====== INTERACTIVE ELEMENTS ====== */
.like-btn {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    cursor: pointer;
    margin: 1.5rem 0;
    transition: transform 0.2s, color 0.2s;
    padding: 10px;
    border-radius: 50%;
}

.like-btn:hover {
    transform: scale(1.1);
    color: #ff69b4;
}

.like-btn.active {
    color: #ff69b4;
    animation: heartbeat 0.3s ease;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Like/Dislike buttons */
.social-like, .social-dislike {
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 900;
}

.social-like:hover, .social-dislike:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.social-like:active, .social-dislike:active {
    background-color: #3299CD;
    transform: scale(0.95);
}

.social-like:active .count, .social-dislike:active .dislike {
    background-color: #3299CD;
}

/* ====== FISH CHAT INTERFACE ====== */
.fish-chat-container {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: clamp(250px, 50vh, 400px);
    backdrop-filter: blur(10px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: clamp(12px, 3vw, 16px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.chat-message {
    display: flex;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    justify-content: flex-end;
}

.fish-message {
    justify-content: flex-start;
}

.message-bubble {
    display: inline-block;
    padding: clamp(10px, 2vw, 12px) clamp(12px, 3vw, 16px);
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.user-message .message-bubble {
    background: rgba(100, 150, 255, 0.8);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(100, 150, 255, 0.4);
}

.fish-message .message-bubble {
    background: rgba(255, 200, 100, 0.8);
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 200, 100, 0.4);
    font-weight: 500;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: clamp(10px, 2vw, 14px);
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input {
    flex: 1;
    padding: clamp(8px, 2vw, 12px) 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.95rem;
    font-family: 'Comic Sans MS', 'Arial Black', sans-serif;
    transition: all 0.3s;
    min-height: 40px;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.chat-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 200, 100, 0.3);
}

.send-button {
    padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 16px);
    background: rgba(100, 200, 150, 0.8);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    min-height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.send-button:hover {
    background: rgba(100, 200, 150, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(100, 200, 150, 0.4);
}

.send-button:active {
    transform: scale(0.95);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile adjustments for chat */
@media (max-width: 480px) {
    .fish-chat-container {
        height: clamp(220px, 45vh, 350px);
        margin: 1.5rem auto 0;
    }

    .chat-messages {
        padding: 10px;
        gap: 10px;
    }

    .message-bubble {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .chat-input-area {
        padding: 10px;
        gap: 6px;
    }

    .chat-input {
        padding: 8px 12px;
        min-height: 38px;
    }

    .send-button {
        min-height: 38px;
        min-width: 38px;
    }
}

/* ====== FORM ELEMENTS ====== */
h3 {
    color: white;
    padding-bottom: 1.5rem;
    font-size: clamp(1rem, 4vw, 1.5rem);
}

textarea {
    width: 90%;
    max-width: 500px;
    padding: 12px;
    margin: 1rem auto;
    border: 2px solid white;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Comic Sans MS', 'Arial Black', sans-serif;
    font-size: 1rem;
    min-height: 80px;
    resize: vertical;
}

textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: #ff69b4;
}

button {
    flex: 1;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-weight: 900;
    transition: all 0.1s;
    font-size: 0.95em;
    font-family: 'Comic Sans MS', 'Arial Black', sans-serif;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ====== HEADINGS ====== */
h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h2 {
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

h3 {
    color: white;
}

/* ====== FOOTER ====== */
footer {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 150, 0.95);
    padding: 15px;
    text-align: center;
    font-size: 0.9rem;
    z-index: 100;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

footer p {
    margin: 0;
}

footer a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.8;
}

@media (max-width: 480px) {
    footer {
        padding: 12px;
        font-size: 0.8rem;
    }

    footer br {
        display: none;
    }

    footer p {
        display: inline;
    }
}

/* ====== UTILITIES ====== */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Touch-friendly spacing */
@media (max-width: 480px) {
    button, a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .nav, footer {
        display: none;
    }

    .background {
        padding: 20px;
    }
}
