/* ========== SAVE/LOAD SYSTEM STYLES ========== */

.save-load-container {
    background: rgba(17, 17, 17, 0.95);
    border-radius: 12px;
    overflow: hidden;
}

.save-load-header {
    padding: 20px;
    background: rgba(255, 68, 68, 0.1);
    border-bottom: 2px solid rgba(255, 68, 68, 0.3);
}

.save-load-header p {
    margin: 0;
    color: #ccc;
    font-size: 1.1rem;
}

.save-load-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.save-load-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 68, 68, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.save-load-item:hover {
    background: rgba(255, 68, 68, 0.05);
    border-color: rgba(255, 68, 68, 0.4);
}

.save-load-item:last-child {
    border-bottom: none;
}

.save-info {
    flex: 1;
    margin-right: 20px;
}

.save-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.save-details {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
}

.save-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.save-actions button {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #ff4444, #cc3333);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff6666, #ff4444);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #666, #444);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #777, #555);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    transform: translateY(-2px);
}

.save-load-footer {
    padding: 20px;
    background: rgba(30, 30, 30, 0.8);
    border-top: 1px solid rgba(255, 68, 68, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.file-import-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-import-section label {
    cursor: pointer;
    display: inline-block;
}

/* Franchise Navigation Styles */
.franchise-navigation {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(50, 50, 50, 0.9));
    border: 2px solid rgba(255, 68, 68, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.franchise-navigation h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

.franchise-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-box {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 68, 68, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.stat-box:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 68, 68, 0.6);
    box-shadow: 0 10px 25px rgba(255, 68, 68, 0.2);
}

.season-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.season-selector select {
    min-width: 300px;
    max-width: 500px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 68, 68, 0.4);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.season-selector select:focus {
    outline: none;
    border-color: rgba(255, 68, 68, 0.8);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.season-selector select option {
    background: #2a2a2a;
    color: #fff;
    padding: 10px;
}

.quick-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-actions button {
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-actions button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.quick-actions button:hover::before {
    width: 300px;
    height: 300px;
}

/* Franchise Overview Styles */
.franchise-overview-section {
    background: rgba(17, 17, 17, 0.8);
    border: 2px solid rgba(255, 68, 68, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
}

.performance-tiers h3,
.archetype-analysis h3,
.franchise-records h3 {
    color: #ff4444;
    margin-bottom: 20px;
    font-size: 1.6rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.tier-grid,
.archetype-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tier-section,
.archetype-card {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.tier-section:hover,
.archetype-card:hover {
    border-color: rgba(255, 68, 68, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tier-section h4 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tier-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(40, 40, 40, 0.6);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.tier-player:hover {
    background: rgba(60, 60, 60, 0.8);
    border-color: rgba(255, 68, 68, 0.3);
}

.archetype-card h5 {
    color: #ff4444;
    margin-bottom: 12px;
    font-size: 1.2rem;
    text-align: center;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.record-card {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.record-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.1), transparent);
    transition: all 0.5s ease;
}

.record-card:hover::before {
    left: 100%;
}

.record-card:hover {
    border-color: rgba(255, 68, 68, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.record-card h5 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.record-card .player-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
    word-wrap: break-word;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-color: #4CAF50;
}

.notification-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-color: #f44336;
}

.notification-info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-color: #2196F3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .save-load-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .save-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .save-load-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .franchise-overview {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .tier-grid,
    .archetype-grid {
        grid-template-columns: 1fr;
    }
    
    .season-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .season-selector select {
        min-width: auto;
        width: 100%;
    }
    
    .quick-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-actions button {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .stat-box {
        padding: 15px;
    }
    
    .stat-box div:first-child {
        font-size: 1.5rem;
    }
    
    .franchise-navigation {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .franchise-overview-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .save-load-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .modal-content {
        max-width: 95vw;
        margin: 10px;
    }
}

/* Custom Scrollbar */
.save-load-list::-webkit-scrollbar {
    width: 8px;
}

.save-load-list::-webkit-scrollbar-track {
    background: rgba(30, 30, 30, 0.8);
    border-radius: 4px;
}

.save-load-list::-webkit-scrollbar-thumb {
    background: rgba(255, 68, 68, 0.6);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.save-load-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 68, 68, 0.8);
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 100;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-left-color: #ff4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Edgic Chart Styles */
.edgic-utr {
    background: rgba(128, 128, 128, 0.6);
    color: #fff;
}

.edgic-mor {
    background: rgba(255, 193, 7, 0.6);
    color: #000;
}

.edgic-cp {
    background: rgba(0, 123, 255, 0.6);
    color: #fff;
}

.edgic-ott {
    background: rgba(255, 0, 0, 0.6);
    color: #fff;
}

.edgic-default {
    background: rgba(108, 117, 125, 0.6);
    color: #fff;
}

/* Voting History Styles */
.eliminated-vote {
    background: rgba(108, 117, 125, 0.4);
    color: #6c757d;
}

.voted-out {
    background: rgba(220, 53, 69, 0.8);
    color: #fff;
    font-weight: bold;
}

.immune {
    background: rgba(255, 193, 7, 0.8);
    color: #000;
    font-weight: bold;
}

.vote-target {
    background: rgba(40, 40, 40, 0.8);
    color: #fff;
}

/* Enhanced Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 2px solid rgba(255, 68, 68, 0.4);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

/* Ensure modal centers properly on all screen sizes */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw !important;
        max-height: 90vh !important;
        margin: 10px !important;
    }
}

.modal-header {
    background: rgba(255, 68, 68, 0.1);
    border-bottom: 2px solid rgba(255, 68, 68, 0.3);
    padding: 20px 25px;
    border-radius: 13px 13px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 68, 68, 0.8);
    transform: rotate(90deg);
}