/* ============================================
   Image Storage & Certification System Styles
   ============================================ */

/* Quota Display */
.quota-display {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border: var(--border-game);
    box-shadow: var(--shadow-game);
}

.quota-item {
    margin-bottom: 16px;
}

.quota-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.quota-bar {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 4px;
}

.quota-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.quota-text {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-medium);
}

/* Display Mode Selector */
.display-mode-selector {
    padding: 24px;
    background: var(--paper-background);
    border-radius: 12px;
}

.display-mode-selector h3 {
    margin: 0 0 20px 0;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.mode-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.mode-option {
    cursor: pointer;
    display: block;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-card {
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.mode-option:hover .mode-card {
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 208, 225, 0.2);
}

.mode-option.active .mode-card {
    border-color: var(--primary-cyan);
    background: rgba(77, 208, 225, 0.1);
}

.mode-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.mode-card h4 {
    margin: 0 0 8px 0;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.mode-card p {
    margin: 0;
    color: var(--text-medium);
    font-size: 0.85rem;
}

/* User Uploaded Image Marker */
.user-uploaded-image {
    border: 3px solid #fbbf24 !important;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5) !important;
}

/* Bird Selector for Certification */
.bird-selector-certification {
    padding: 24px;
    background: white;
    border-radius: 12px;
    max-height: 80vh;
    overflow-y: auto;
}

.bird-selector-certification h3 {
    margin: 0 0 20px 0;
    color: var(--text-dark);
    font-size: 1.3rem;
    text-align: center;
}

.bird-selector-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.bird-selector-tab {
    padding: 10px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.bird-selector-tab:hover {
    background: #e0e0e0;
}

.bird-selector-tab.active {
    background: var(--primary-cyan);
    color: white;
}

.bird-selector-content {
    position: relative;
}

.bird-selector-panel {
    display: none;
}

.bird-selector-panel.active {
    display: block;
}

.bird-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.bird-card-vote {
    cursor: pointer;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    transition: all 0.2s ease;
}

.bird-card-vote:hover {
    border-color: var(--primary-cyan);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bird-card-vote img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.bird-card-vote .bird-name {
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-dark);
}

.bird-selector-cancel {
    margin-top: 20px;
    padding: 12px 24px;
    background: #9e9e9e;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
}

.bird-selector-cancel:hover {
    background: #757575;
}

/* Certification Statistics */
.certification-stats {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
}

.certification-stats h4 {
    margin: 0 0 16px 0;
    color: var(--text-dark);
}

.vote-result {
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.vote-result.top-vote {
    border-color: var(--primary-cyan);
    background: rgba(77, 208, 225, 0.05);
}

.vote-result.certified {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.vote-bird-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.vote-bar {
    height: 24px;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 4px;
}

.vote-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--secondary-cyan));
    transition: width 0.3s ease;
}

.vote-percentage {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-medium);
}

.certified-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #10b981;
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.vote-count {
    margin-top: 16px;
    text-align: center;
    color: var(--text-medium);
    font-size: 0.9rem;
}

.no-votes {
    text-align: center;
    color: var(--text-medium);
    padding: 40px 20px;
}

/* Pending Certifications */
.pending-certifications {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.pending-cert-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: var(--border-game);
    box-shadow: var(--shadow-game);
    transition: transform 0.2s ease;
}

.pending-cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.pending-cert-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.pending-cert-info {
    padding: 16px;
}

.claimed-bird {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.uploader {
    font-size: 0.85rem;
    color: var(--text-medium);
    margin-bottom: 12px;
}

.vote-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary-cyan);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.vote-btn:hover {
    background: var(--secondary-cyan);
}

.no-pending {
    text-align: center;
    color: var(--text-medium);
    padding: 60px 20px;
    font-size: 1.1rem;
}

/* Vote Modal */
#vote-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

#vote-modal.active {
    display: flex;
}

#vote-bird-selector {
    max-width: 800px;
    width: 90%;
}

/* Error and Info Messages */
.error {
    color: #ef4444;
    text-align: center;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mode-options {
        grid-template-columns: 1fr;
    }

    .bird-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .pending-certifications {
        grid-template-columns: 1fr;
    }
}