:root {
    --primary: #cd675f;
    --background: #0f0e15;
    --surface: #1a1a25;
    --surface-hover: #242432;
    --text: #cd675f;
    --text-secondary: #94a1b2;
    --border: #363646;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(26, 26, 37, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #cd675f;
}


.nav-links {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: var(--surface-hover);
    transform: translateY(-2px);
}

.nav-link i {
    font-size: 1.1rem;
}

/* Style spécifique pour la page active */
.nav-link.active {
    background-color: var(--primary);
    color: white;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(205, 103, 95, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Cache les parties qui dépassent */
}

#avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garantit que l'image remplit le cercle */
}

.login-btn {
    background: #cd675f;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.login-btn:hover {
    background: #b35a53;
}

.logout-btn {
    background: #cd675f;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #b35a53;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

#searchInput {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#searchInput:focus {
    border-color: #cd675f;
    box-shadow: 0 0 0 4px rgba(205, 103, 95, 0.2);
}

.search-box button {
    padding: 0 2rem;
    background: #cd675f;
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-box button:hover {
    background: #b35a53;
}

.selector-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.selector-container select {
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.2s;
}

.selector-container select:hover {
    background: var(--surface-hover);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.player-container {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.login-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.login-required i {
    font-size: 3rem;
    color: white;
}

.login-required .login-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.login-required .login-btn:hover {
    background: #b35a53;
    transform: translateY(-2px);
}

#videoPlayer {
    width: 100%;
    flex: 1;
    border: none;
    background: #000000;
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
}

.controls button {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.controls button:hover {
    background: #cd675f;
    border-color: #cd675f;
    color: white;
}

#episodeInput {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.5rem;
    width: 80px;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    animation: fadeIn 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Version mobile */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    header {
        padding: 0.75rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .selector-container {
        grid-template-columns: 1fr;
    }
    
    .search-box button {
        padding: 0 1rem;
    }
}


* Styles du profil */
.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 4px solid var(--primary);
    box-shadow: 0 0 15px rgba(205, 103, 95, 0.4);
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-details {
    margin-top: 2rem;
}

.info-card {
    background: var(--background);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.info-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 1.5rem;
    width: 30px;
    text-align: center;
}

.info-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.info-value {
    color: var(--text);
    font-weight: 500;
}

.premium-badge {
    background: linear-gradient(45deg, #ffd700, #c5a000);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    margin-left: 10px;
    color: #000;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .profile-avatar {
        width: 120px;
        height: 120px;
    }
    
    .info-item {
        padding: 0.8rem 0;
    }
}

.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70vh;
}

.error-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.error-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.error-card h2 {
    color: var(--text);
    margin-bottom: 1rem;
}

.error-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #b35a53;
    transform: translateY(-2px);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1rem;
}

/* styles.css */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-add {
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-add:hover {
    background: #45a049;
}

.season-card {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
}

.btn-secondary {
    background: #4CAF50;
    color: white;
}

.btn-danger {
    background: #f44336;
    color: white;
    margin-top: 0.5rem;
}

.catalog-container {
    padding: 2rem;
}

.grid {
    gap: 1.5rem;
    padding: 1rem 0;
}

.card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    position: relative;
    height: 75px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: flex-end;
}

.card-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1.3em;
}

.card-meta {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 1rem;
}

.season-toggle {
    background: var(--background);
    border: none;
    color: var(--text);
    padding: 0.8rem;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.season-toggle:hover {
    background: var(--surface-hover);
}

.season-item {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
}

.season-title {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1em;
}

.source-section {
    margin-bottom: 1.5rem;
}

.source-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.episode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.episode-item {
    background: var(--background);
    border-radius: 6px;
    overflow: hidden;
}

.episode-link {
    display: block;
    padding: 0.6rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.2s;
}

.episode-link:hover {
    background: var(--surface-hover);
}

.episode-link i {
    margin-right: 0.5rem;
    color: var(--primary);
}

@media (max-width: 768px) {
    .card-header {
        height: 200px;
    }
    
    .episode-list {
        grid-template-columns: 1fr;
    }
}

.form-container {
    max-width: 200vh;
    padding: 2rem;
    background: #2a2a2a;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    color: white;
}

.form-group textarea {
    min-height: 150px;
    font-family: monospace;
    white-space: pre;
    overflow-x: auto;
}

.season-card {
    background: #3a3a3a;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    position: relative;
}

.season-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-remove-season {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-season:hover {
    background: #cc0000;
}

#add-season-btn {
    margin-bottom: 2rem;
}

.btn-primary {
    background: #4CAF50;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #3e8e41;
}

.btn-secondary {
    background: #2196F3;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 1rem;
}

.btn-secondary:hover {
    background: #0b7dda;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #ff6b6b, #ff3838);
    padding: 4px 12px 4px 8px;
    border-radius: 20px;
    margin-left: 10px;
    box-shadow: 0 2px 8px rgba(255, 56, 56, 0.3);
    animation: pulse 1.5s infinite;
}

.admin-text {
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    text-transform: uppercase;
}

@keyframes jingle {
    0% { transform: rotate(-15deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(-15deg); }
    75% { transform: rotate(5deg); }
    100% { transform: rotate(-15deg); }
}