* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    margin: 0;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #2d3436;
    margin-bottom: 8px;
    font-size: 2rem;
}

.subtitle {
    color: #636e72;
    margin-bottom: 24px;
    font-size: 1rem;
}

.wheel-container {
    position: relative;
    display: inline-block;
    margin: 20px 0;
}

#wheelCanvas {
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.fish-input-section {
    margin: 24px 0;
    text-align: left;
}

.fish-input-section label {
    display: block;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.fish-input-section label .label-icon {
    font-size: 1.1rem;
}

#fishList {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    border: 2px solid #dfe6e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f8f9fa;
}

#fishList:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: #fff;
}

#fishList::placeholder {
    color: #b2bec3;
}

.spin-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 14px 48px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-top: 16px;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.spin-btn:active:not(:disabled) {
    transform: translateY(0);
}

.spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spin-btn .btn-icon {
    margin-right: 8px;
}

#result {
    margin-top: 16px;
    margin-bottom: 16px;
    min-height: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.result-animation {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.result-icon {
    font-size: 2.5rem;
    animation: bounce 1s infinite;
}

.result-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3436;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-subtitle {
    color: #636e72;
    font-size: 1rem;
    margin-top: 8px;
    font-style: italic;
}

@keyframes popIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.fish-count {
    text-align: right;
    font-size: 0.85rem;
    color: #b2bec3;
    margin-top: 4px;
}

/* Checkbox grid for Mediterranean fish */
.fish-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 16px;
    margin-bottom: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: #f8f9fa;
    border: 2px solid #dfe6e9;
    border-radius: 12px;
}

.fish-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.fish-checkboxes::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.fish-checkboxes::-webkit-scrollbar-thumb {
    background: #b2bec3;
    border-radius: 3px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3436;
}

.checkbox-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-item span {
    user-select: none;
}

/* Add fish button */
.add-fish-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    margin-top: 10px;
}

.add-fish-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

/* Custom fish remove button */
.remove-fish-btn {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    margin-left: auto;
    line-height: 1;
    transition: color 0.2s;
}

.remove-fish-btn:hover {
    color: #c0392b;
}

/* Share button */
.share-btn {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    border: none;
    color: white;
    padding: 10px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
    margin-top: 8px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.6);
}

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

/* Share toast notification */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2d3436;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
}

.share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Page footer */
.page-footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #dfe6e9;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-credit {
    color: #636e72;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-credit:hover {
    color: #667eea;
}

.footer-credit strong {
    color: #2d3436;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #636e72;
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 50px;
    border: 1px solid #dfe6e9;
}

/* Responsive: single column on narrow screens */
@media (max-width: 480px) {
    .fish-checkboxes {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 20px;
        max-width: 100%;
    }

    .wheel-container {
        max-width: 100%;
        overflow: hidden;
    }

    #wheelCanvas {
        max-width: 100%;
        height: auto;
        width: 340px !important;
    }

    h1 {
        font-size: 1.5rem;
    }
}
