:root {
    --deep-ocean: #0a1628;
    --mid-ocean: #132744;
    --surface-glow: #1e4a6d;
    --bubble-blue: #5bc0eb;
    --coral-pink: #ff6b9d;
    --seaweed-green: #00d4aa;
    --sandy-gold: #ffc857;
    --pearl-white: #f0f4f8;
}

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

body {
    font-family: 'Quicksand', sans-serif;
    background: var(--deep-ocean);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--pearl-white);
}

/* Underwater Background */
.ocean-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 50% 0%, var(--surface-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(0, 212, 170, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 60%, rgba(255, 107, 157, 0.08) 0%, transparent 35%),
        linear-gradient(180deg, var(--mid-ocean) 0%, var(--deep-ocean) 100%);
    z-index: -2;
}

/* Floating Bubbles */
.bubbles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), rgba(91,192,235,0.1));
    border-radius: 50%;
    animation: rise linear infinite;
    opacity: 0.6;
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-50vh) translateX(20px) scale(1.1);
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100vh) translateX(-10px) scale(0.8);
        opacity: 0;
    }
}

/* Header */
header {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 3.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--bubble-blue), var(--coral-pink), var(--sandy-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(91, 192, 235, 0.3);
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--bubble-blue);
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 2rem 3rem;
}

/* Fish Preview */
.fish-preview {
    background: linear-gradient(135deg, rgba(30, 74, 109, 0.4), rgba(19, 39, 68, 0.6));
    border: 2px solid rgba(91, 192, 235, 0.2);
    border-radius: 30px;
    padding: 3rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1s ease-out 0.3s both;
    backdrop-filter: blur(10px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.fish-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(91, 192, 235, 0.05) 0%, transparent 50%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20%, 20%); }
}

/* Fish SVG Container */
.fish-container {
    position: relative;
    width: 320px;
    height: 200px;
    animation: swim 4s ease-in-out infinite;
}

@keyframes swim {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(15px) rotate(2deg); }
    75% { transform: translateX(-15px) rotate(-2deg); }
}

.fish-part {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Customization Panel */
.customization-panel {
    display: grid;
    gap: 1rem;
    animation: fadeIn 1s ease-out 0.5s both;
}

.option-row {
    background: linear-gradient(135deg, rgba(30, 74, 109, 0.3), rgba(19, 39, 68, 0.5));
    border: 1px solid rgba(91, 192, 235, 0.15);
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.option-row:hover {
    border-color: rgba(91, 192, 235, 0.4);
    background: linear-gradient(135deg, rgba(30, 74, 109, 0.5), rgba(19, 39, 68, 0.6));
    transform: translateX(5px);
}

.option-label {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sandy-gold);
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.option-label .icon {
    font-size: 1.4rem;
}

.option-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.arrow-btn {
    width: 48px;
    height: 48px;
    border: 2px solid var(--bubble-blue);
    background: transparent;
    border-radius: 50%;
    color: var(--bubble-blue);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.arrow-btn:hover {
    background: var(--bubble-blue);
    color: var(--deep-ocean);
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(91, 192, 235, 0.5);
}

.arrow-btn:active {
    transform: scale(0.95);
}

.option-value {
    min-width: 140px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pearl-white);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

/* Button Row */
.button-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Random Button */
.random-btn, .save-btn {
    padding: 1rem 2.5rem;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.random-btn {
    background: linear-gradient(135deg, var(--coral-pink), var(--sandy-gold));
    color: var(--deep-ocean);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.3);
}

.random-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
}

.random-btn:active {
    transform: translateY(0) scale(0.98);
}

.save-btn {
    background: linear-gradient(135deg, var(--bubble-blue), var(--seaweed-green));
    color: var(--deep-ocean);
    box-shadow: 0 8px 30px rgba(91, 192, 235, 0.3);
}

.save-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(91, 192, 235, 0.4);
}

.save-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: linear-gradient(135deg, var(--mid-ocean), var(--deep-ocean));
    border: 2px solid var(--bubble-blue);
    border-radius: 25px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(91, 192, 235, 0.2);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--pearl-white);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--coral-pink);
    transform: rotate(90deg);
}

.modal h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.8rem;
    color: var(--sandy-gold);
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal p {
    color: var(--pearl-white);
    opacity: 0.8;
    text-align: center;
    margin-bottom: 1.5rem;
}

.link-container {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 0.5rem;
}

.link-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--pearl-white);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
    outline: none;
}

.copy-btn {
    padding: 0.8rem 1.5rem;
    background: var(--bubble-blue);
    border: none;
    border-radius: 10px;
    color: var(--deep-ocean);
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--seaweed-green);
    transform: scale(1.05);
}

.copy-feedback {
    color: var(--seaweed-green) !important;
    font-weight: 600;
    opacity: 0 !important;
    transition: opacity 0.3s ease;
    margin-bottom: 0 !important;
    margin-top: 1rem !important;
}

.copy-feedback.show {
    opacity: 1 !important;
}

/* Fish Name */
.fish-name {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 1rem;
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    color: var(--seaweed-green);
    background: transparent;
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 0.5rem 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.fish-name:hover {
    border-color: rgba(0, 212, 170, 0.3);
}

.fish-name:focus {
    border-color: var(--seaweed-green);
    background: rgba(0, 212, 170, 0.1);
}

.fish-name::placeholder {
    color: var(--seaweed-green);
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    .fish-preview { padding: 2rem 1rem; }
    .fish-container { transform: scale(0.8); }
    .option-row { flex-direction: column; gap: 1rem; text-align: center; }
    .option-label { justify-content: center; }
    .arrow-btn { width: 44px; height: 44px; }
}
