/* Pageants CSS - Dark Red, Blue, Grey Gradients */

:root {
    --dark-red: #8B0000;
    --crimson: #DC143C;
    --fire-red: #E63946;
    --dark-blue: #1A1A2E;
    --navy: #16213E;
    --steel-blue: #0F3460;
    --grey: #2C3E50;
    --light-grey: #95A5A6;
    --silver: #BDC3C7;
    --gradient-red: linear-gradient(135deg, #8B0000, #DC143C, #E63946);
    --gradient-blue: linear-gradient(135deg, #1A1A2E, #16213E, #0F3460);
    --gradient-grey: linear-gradient(135deg, #2C3E50, #34495E, #4A5568);
    --gradient-mixed: linear-gradient(135deg, #8B0000, #1A1A2E, #2C3E50);
}

/* Pageant Container */
.pageant-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Pageant Header */
.pageant-header {
    background: var(--gradient-mixed);
    color: white;
    padding: 40px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
}

.pageant-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.pageant-header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Competitions Grid */
.competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.competition-card {
    background: var(--gradient-blue);
    color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.competition-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.competition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(139,0,0,0.3);
}

.competition-card:hover::before {
    transform: rotate(45deg) translate(50%, 50%);
}

.competition-card.national {
    background: var(--gradient-red);
}

.competition-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.competition-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.competition-card .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
}

.competition-card .count {
    display: inline-block;
    margin-top: 15px;
    padding: 5px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.9em;
}

/* Contestants Grid */
.contestants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.contestant-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 1px solid var(--silver);
}

.contestant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(139,0,0,0.2);
    border-color: var(--dark-red);
}

.contestant-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 3px solid var(--gradient-red);
}

.contestant-info {
    padding: 20px;
    background: var(--gradient-grey);
    color: white;
}

.contestant-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 5px;
    color: white;
}

.contestant-stage {
    color: var(--silver);
    font-style: italic;
    margin-bottom: 10px;
}

.contestant-university {
    font-size: 0.9em;
    color: var(--light-grey);
    margin-bottom: 10px;
}

.contestant-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.vote-count {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--crimson);
}

.rank-badge {
    background: var(--gradient-red);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
}

.vote-button {
    width: 100%;
    padding: 12px;
    background: var(--gradient-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vote-button:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(139,0,0,0.4);
}

.vote-button:disabled {
    background: var(--light-grey);
    cursor: not-allowed;
    opacity: 0.6;
}

.vote-button.voted {
    background: var(--gradient-blue);
}

/* Province Groups */
.province-group {
    margin-bottom: 40px;
}

.province-title {
    background: var(--gradient-mixed);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Registration Form */
.registration-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--gradient-grey);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--silver);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--steel-blue);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--crimson);
    background: rgba(255,255,255,0.15);
}

.form-group input[type="file"] {
    padding: 10px;
    background: var(--steel-blue);
    border: 2px dashed var(--crimson);
    cursor: pointer;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--light-grey);
    font-size: 0.8em;
}

/* Leaderboard */
.leaderboard-table {
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.leaderboard-header {
    background: var(--gradient-red);
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    display: grid;
    grid-template-columns: 80px 1fr 150px 100px;
    gap: 15px;
}

.leaderboard-row {
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 80px 1fr 150px 100px;
    gap: 15px;
    border-bottom: 1px solid var(--silver);
    transition: background 0.3s;
}

.leaderboard-row:hover {
    background: rgba(139,0,0,0.05);
}

.leaderboard-rank {
    font-weight: bold;
    color: var(--dark-red);
}

.leaderboard-contestant {
    display: flex;
    align-items: center;
    gap: 15px;
}

.leaderboard-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--crimson);
}

.leaderboard-votes {
    font-weight: bold;
    color: var(--dark-blue);
}

/* Responsive Design */
@media (max-width: 768px) {
    .pageant-header h1 {
        font-size: 2em;
    }
    
    .competitions-grid {
        grid-template-columns: 1fr;
    }
    
    .contestants-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns: 50px 1fr 80px 60px;
        gap: 10px;
        font-size: 0.9em;
    }
    
    .leaderboard-avatar {
        width: 40px;
        height: 40px;
    }
}

/* Loading Spinner */
.pageant-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.pageant-spinner i {
    font-size: 3em;
    color: var(--dark-red);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.pageant-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    padding: 15px 20px;
    background: var(--gradient-mixed);
    color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.pageant-toast.success {
    background: linear-gradient(135deg, #2E7D32, #388E3C, #43A047);
}

.pageant-toast.error {
    background: linear-gradient(135deg, #8B0000, #C62828, #D32F2F);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}/* Add to pageant.css */

/* Leaderboard Table */
.leaderboard-section {
    margin: 40px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.leaderboard-section h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 24px;
}

.leaderboard-section h2 i {
    color: var(--dark-red);
    margin-right: 10px;
}

.leaderboard-table-container {
    overflow-x: auto;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.leaderboard-table thead {
    background: linear-gradient(135deg, var(--dark-red), var(--crimson));
}

.leaderboard-table th {
    padding: 15px 10px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.leaderboard-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
}

.leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.leaderboard-table td {
    padding: 15px 10px;
    color: #fff;
}

.rank-cell {
    font-weight: bold;
    text-align: center;
}

.gold-medal i {
    color: #FFD700;
    font-size: 20px;
}

.silver-medal i {
    color: #C0C0C0;
    font-size: 18px;
}

.bronze-medal i {
    color: #CD7F32;
    font-size: 18px;
}

.contestant-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contestant-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--dark-red);
}

.contestant-info {
    display: flex;
    flex-direction: column;
}

.contestant-info small {
    color: #999;
    font-size: 11px;
}

.votes-cell {
    position: relative;
    min-width: 120px;
}

.vote-count {
    font-weight: bold;
    color: var(--dark-red);
    position: relative;
    z-index: 2;
}

.vote-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.3), rgba(220, 53, 69, 0.1));
    border-radius: 4px;
    z-index: 1;
    transition: width 0.3s;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.approved {
    background: #28a745;
    color: white;
}

.status-badge.pending {
    background: #ffc107;
    color: #000;
}

.vote-small-btn {
    background: var(--dark-red);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.vote-small-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.voted-badge {
    color: #28a745;
    font-size: 12px;
}

.voted-badge i {
    margin-right: 3px;
}

.voted-row {
    background: rgba(40, 167, 69, 0.1);
}

.current-user-row {
    background: rgba(220, 53, 69, 0.1);
    border-left: 3px solid var(--dark-red);
}

/* My Registrations Section */
.my-registrations-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(0, 0, 0, 0.3));
    border-radius: 20px;
}

.my-registrations-section h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 22px;
}

.my-registrations-section h2 i {
    color: var(--dark-red);
    margin-right: 10px;
}

.registrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.registration-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.registration-card:hover {
    transform: translateY(-5px);
    border-color: var(--dark-red);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.2);
}

.registration-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.registration-status.approved {
    background: #28a745;
    color: white;
}

.registration-status.pending {
    background: #ffc107;
    color: #000;
}

.registration-card h3 {
    color: white;
    margin: 10px 0;
    font-size: 18px;
}

.registration-date {
    color: #999;
    font-size: 12px;
    margin: 5px 0;
}

.stage-name {
    color: var(--dark-red);
    font-size: 14px;
    margin: 5px 0;
    font-style: italic;
}

.registration-stats {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    color: #fff;
    font-size: 13px;
}

.registration-stats i {
    color: var(--dark-red);
    margin-right: 5px;
}

.btn-view-registration {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 2px solid var(--dark-red);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

.btn-view-registration:hover {
    background: var(--dark-red);
}

.competition-card.registered {
    border: 2px solid var(--dark-red);
    position: relative;
}

.registered-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--dark-red);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
}

.registered-confirmation {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
}

.registered-confirmation i {
    margin-right: 5px;
}