/* Scoring Page Styles - Personal Stats & Collection */

/* ==================== LOGIN PROMPT ==================== */
.not-logged-in {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-prompt {
    text-align: center;
    background: var(--panel-bg);
    border: 2px solid var(--accent-strong);
    border-radius: 12px;
    padding: 50px 40px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 20px var(--shadow);
}

.login-prompt-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

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

.login-prompt h2 {
    color: var(--accent);
    margin: 0 0 15px 0;
    font-size: 1.8em;
}

.login-prompt p {
    color: var(--text-secondary);
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.btn.primary {
    background: var(--accent);
    color: var(--panel-bg);
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn.primary:hover {
    background: var(--accent-strong);
    transform: scale(1.05);
}

/* ==================== LOGGED IN VIEW ==================== */
.logged-in-view {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scoring-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease;
}

.scoring-header h1 {
    color: var(--accent);
    font-size: 2.5em;
    margin: 0 0 10px 0;
}

.scoring-header p {
    color: var(--text-secondary);
    font-size: 1.1em;
    margin: 0;
}

/* ==================== STATS CARDS ==================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.stat-card {
    background: var(--panel-bg);
    border: 2px solid var(--accent-strong);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s ease forwards;
}

.stat-card[data-delay="0"] { animation-delay: 0s; }
.stat-card[data-delay="100"] { animation-delay: 0.1s; }
.stat-card[data-delay="200"] { animation-delay: 0.2s; }
.stat-card[data-delay="300"] { animation-delay: 0.3s; }

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

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
    border-color: var(--accent);
}

.stat-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--accent);
    margin: 10px 0;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95em;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.rank-info-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1em;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    transition: color 0.3s ease;
    opacity: 0.7;
}

.rank-info-btn:hover {
    color: var(--accent);
    opacity: 1;
}

/* Platin-Fortschritt Info */
.platin-info,
.platin-remaining {
    display: block;
    font-size: 0.5em;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-top: 4px;
    font-weight: normal;
}

/* ==================== COLLECTION SECTION ==================== */
.collection-section {
    margin-top: 50px;
}

.collection-section h2 {
    color: var(--accent);
    font-size: 2em;
    border-bottom: 3px solid var(--accent-strong);
    padding-bottom: 15px;
    margin: 0 0 20px 0;
}

.collection-info {
    color: var(--text-secondary);
    font-size: 1em;
    margin-bottom: 25px;
    text-align: center;
}

.mushroom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.mushroom-card {
    background: var(--panel-bg);
    border: 2px solid var(--accent-strong);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s ease forwards;
    cursor: pointer;
}

/* Staggered animation delays for mushroom cards */
.mushroom-card:nth-child(1) { animation-delay: 0s; }
.mushroom-card:nth-child(2) { animation-delay: 0.05s; }
.mushroom-card:nth-child(3) { animation-delay: 0.1s; }
.mushroom-card:nth-child(4) { animation-delay: 0.15s; }
.mushroom-card:nth-child(5) { animation-delay: 0.2s; }
.mushroom-card:nth-child(6) { animation-delay: 0.25s; }
.mushroom-card:nth-child(7) { animation-delay: 0.3s; }
.mushroom-card:nth-child(8) { animation-delay: 0.35s; }
.mushroom-card:nth-child(9) { animation-delay: 0.4s; }
.mushroom-card:nth-child(10) { animation-delay: 0.45s; }
.mushroom-card:nth-child(n+11) { animation-delay: 0.5s; }

.mushroom-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px var(--shadow);
    border-color: var(--accent);
}

.mushroom-image {
    font-size: 4em;
    margin-bottom: 15px;
}

.mushroom-name {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1em;
    margin: 0 0 5px 0;
}

.mushroom-scientific {
    color: var(--text-secondary);
    font-size: 0.85em;
    font-style: italic;
    margin: 0 0 10px 0;
}

.mushroom-edibility {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    margin-top: 8px;
}

.edibility-edible {
    background: #27ae60;
    color: white;
}

.edibility-poisonous {
    background: #e74c3c;
    color: white;
}

.edibility-inedible {
    background: #95a5a6;
    color: white;
}

.mushroom-date {
    color: var(--text-secondary);
    font-size: 0.75em;
    margin-top: 10px;
}

/* ==================== DARK MODE ==================== */
.dark .stat-card,
.dark .mushroom-card,
.dark .login-prompt {
    background: var(--panel-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.dark .stat-card:hover,
.dark .mushroom-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .scoring-header h1 {
        font-size: 2em;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-icon {
        font-size: 2.5em;
    }

    .stat-value {
        font-size: 2em;
    }

    .mushroom-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .mushroom-card {
        padding: 12px;
    }

    .mushroom-image {
        font-size: 2.8em;
    }

    .mushroom-name {
        font-size: 1em;
    }

    .mushroom-scientific {
        font-size: 0.8em;
    }

    .login-prompt {
        padding: 40px 30px;
        margin: 20px;
    }

    .login-prompt-icon {
        font-size: 4em;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }

    .mushroom-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .mushroom-card {
        padding: 10px;
    }

    .mushroom-image {
        font-size: 2.5em;
    }
}

/* ==================== CARD ENHANCEMENTS ==================== */

.mushroom-card {
    cursor: pointer;
}

.mushroom-card-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--accent);
}

.view-details {
    color: var(--accent-strong);
    font-size: 0.85em;
    font-weight: 600;
    transition: color 0.2s ease;
}

.mushroom-card:hover .view-details {
    color: var(--accent);
}

.edibility-unknown {
    background: #f39c12;
    color: white;
}

/* ==================== FUNGI MODAL ==================== */

.fungi-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--panel-bg);
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 3px solid var(--accent);
    animation: modalSlideIn 0.3s ease;
    box-sizing: border-box;
    transition: all 0.3s ease;
    z-index: 2;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: var(--panel-bg);
    border: 2.5px solid var(--accent-strong);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.7em;
    color: var(--text);
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    background-clip: padding-box;
    outline: none;
}
.modal-close:focus {
    outline: 2px solid var(--accent-strong);
}
.modal-close:hover {
    color: #fff;
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}
.modal-body {
    padding: 30px;
    padding-top: 50px;
    transition: padding 0.3s ease;
}
.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 20px;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}
.modal-icon {
    font-size: 3em;
    transition: font-size 0.3s ease;
}
.modal-titles {
    flex: 1;
    min-width: 200px;
    transition: all 0.3s ease;
    text-align: left;
    align-items: flex-start;
    justify-content: flex-start;
    display: flex;
    flex-direction: column;
}
.modal-titles h2 {
    margin: 0 0 5px 0;
    color: var(--accent-strong);
    font-size: 1.8em;
    transition: font-size 0.3s ease;
}
.modal-latin {
    font-style: italic;
    color: var(--text-secondary);
    margin: 0;
    font-size: 1.1em;
    transition: all 0.3s ease;
}
.modal-english {
    color: var(--text);
    margin: 5px 0 0 0;
    font-size: 0.95em;
    transition: all 0.3s ease;
}
.modal-edibility {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1em;
    white-space: nowrap;
    align-self: flex-end;
    margin-top: 30px;
    transition: all 0.3s ease;
}
.edibility-toxic {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #c62828;
}
.dark .edibility-toxic {
    background: #4a1a1a;
    color: #ff6b6b;
    border-color: #ff6b6b;
}
.edibility-edible {
    background: #f3e5f5;
    color: #6a1b9a;
    border: 2px solid #6a1b9a;
}
.dark .edibility-edible {
    background: #3a1a4a;
    color: #ce93d8;
    border-color: #ce93d8;
}
.edibility-safe {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #2e7d32;
}
.dark .edibility-safe {
    background: #1a4a1a;
    color: #81c784;
    border-color: #81c784;
}
.warning-box {
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #e65100;
    font-size: 1em;
}
.dark .warning-box {
    background: #4a2a0a;
    border-color: #ffb74d;
    color: #ffcc80;
}
.modal-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.modal-section {
    background: rgba(160, 112, 77, 0.08);
    border-radius: 10px;
    padding: 20px;
}
.dark .modal-section {
    background: rgba(160, 112, 77, 0.15);
}
.modal-section h3 {
    margin: 0 0 12px 0;
    color: var(--accent-strong);
    font-size: 1.1em;
}
.modal-section p {
    margin: 0;
    color: var(--text);
    line-height: 1.7;
}
.recognition-info {
    background: rgba(39, 174, 96, 0.1);
    border-left: 4px solid #27ae60;
}
.dark .recognition-info {
    background: rgba(39, 174, 96, 0.2);
}
.modal-sources ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.modal-sources li {
    margin: 8px 0;
}
.modal-sources a {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}
.modal-sources a:hover {
    text-decoration: underline;
    color: var(--accent-strong);
}

/* ==================== RESPONSIVE FOR MODAL ==================== */

@media (max-width: 768px) {
    .modal-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 10px;
        padding-bottom: 15px;
    }
    
    .modal-icon {
        font-size: 2em;
        margin-bottom: 0;
    }
    
    .modal-edibility {
        align-self: center;
        margin-top: 10px;
    }
    
    .modal-titles {
        text-align: center;
    }
    
    .modal-titles h2 {
        margin-bottom: 5px;
    }
    
    .modal-latin,
    .modal-english {
        margin: 3px 0;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-height: 95vh;
        margin: 5px;
        border-radius: 10px;
        border-width: 2px;
    }
    
    .modal-body {
        padding: 15px;
        padding-top: 45px;
    }
    
    .modal-header {
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    .modal-icon {
        font-size: 1.8em;
    }
    
    .modal-titles h2 {
        font-size: 1.2em;
        word-break: break-word;
    }
    
    .modal-latin {
        font-size: 0.9em;
    }
    
    .modal-section {
        padding: 12px;
    }
    
    .modal-section p {
        font-size: 0.95em;
    }
    
    .modal-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 1.2em;
    }
    
    .modal-edibility {
        padding: 6px 12px;
        font-size: 0.85em;
        margin-top: 8px;
    }
    
    .fungi-modal {
        padding-top: 60px;
    }
}

/* Rank Info Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--panel-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--accent-strong);
}

.modal-header h2 {
    margin: 0;
    color: var(--accent);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: var(--text);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.rank-thresholds {
    margin: 20px 0;
}

.rank-threshold {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.rank-threshold:last-child {
    border-bottom: none;
}

.rank-threshold-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-threshold-emoji {
    font-size: 1.5em;
}

.rank-threshold-name {
    font-weight: bold;
    color: var(--accent);
}

.rank-threshold-value {
    font-weight: bold;
    color: var(--text);
}

.modal-note {
    margin-top: 20px;
    padding: 15px;
    background: var(--accent-light);
    border-radius: 8px;
    font-size: 0.9em;
}

.dark .modal-note {
    background: rgba(255, 255, 255, 0.1);
}