/* Draft Analyzer - U.GG Style Moderne et Fluide */
/* Build The Rift - Draft Synergy Assistant */

/* ===================================================================
   Reset Global - Force dark background
=================================================================== */
* {
    box-sizing: border-box;
}

html,
body {
    background: #0d0e0f !important;
    min-height: 100vh;
}

.main-content,
.container,
.hero-section,
.configuration-section,
.draft-interface,
.recommendations-panel,
.composition-summary,
.card,
.card-header,
.card-body {
    background: transparent !important;
}

/* Fix select dropdowns white background */
select,
select option {
    background: var(--ugg-card-bg) !important;
    color: var(--ugg-text-primary) !important;
}

/* ===================================================================
   Hero Section - Design fluide
=================================================================== */
.hero-section {
    text-align: center;
    padding: 3rem 0 2rem;
    margin-bottom: 2rem;
    background: transparent;
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hero-description {
    color: var(--ugg-text-secondary);
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================================================
   Configuration Section - Layout en grille fluide
=================================================================== */
.configuration-section {
    margin-bottom: 2rem;
}

.configuration-section .card {
    background: transparent;
    border: none;
    padding: 0;
}

.configuration-section .card-header {
    background: transparent;
    border: none;
    padding: 0 0 1.5rem 0;
}

.configuration-section .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ugg-text-primary);
    margin-bottom: 0.5rem;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.role-config {
    background: var(--ugg-card-bg);
    border: 1px solid var(--ugg-border);
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.role-config:hover {
    border-color: var(--ugg-blue);
    transform: translateY(-2px);
}

.role-title {
    font-size: 0.875rem;
    color: var(--ugg-text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.selected-champions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    min-height: 70px;
    padding: 0.75rem;
    background: var(--ugg-bg-tertiary);
    border-radius: 4px;
    align-items: flex-start;
    border: 1px solid var(--ugg-border);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selected-champions:hover {
    border-color: var(--ugg-blue);
    background: rgba(83, 131, 232, 0.05);
}

.btn-add-champion {
    width: 100%;
    padding: 0.5rem;
    background: transparent;
    border: 1px dashed var(--ugg-border);
    border-radius: 4px;
    color: var(--ugg-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-champion:hover {
    border-color: var(--ugg-blue);
    color: var(--ugg-blue);
    background: rgba(83, 131, 232, 0.05);
}

.placeholder-text {
    color: var(--ugg-text-tertiary);
    font-style: italic;
    font-size: 0.8125rem;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
}

.selected-champion-chip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--ugg-blue);
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border-radius: 3px;
    color: white;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.selected-champion-chip:hover {
    background: var(--ugg-blue-light);
}

.selected-champion-chip img {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.selected-champion-chip .remove-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 10px;
}

.selected-champion-chip .remove-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ===================================================================
   Draft Interface - Layout en colonnes fluides
=================================================================== */
.draft-interface {
    margin-top: 2rem;
}

.teams-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.team-section {
    background: var(--ugg-card-bg);
    border: 1px solid var(--ugg-border);
    border-radius: 6px;
    padding: 1.25rem;
    position: relative;
}

.team-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 6px 0 0 6px;
}

.ally-team::before {
    background: var(--ugg-cyan);
}

.enemy-team::before {
    background: #ef4444;
}

.team-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ugg-text-primary);
    font-weight: 600;
}

.team-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.champion-slot {
    background: var(--ugg-bg-tertiary);
    border: 1px solid var(--ugg-border);
    border-radius: 4px;
    padding: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
}

.champion-slot:hover {
    border-color: var(--ugg-blue);
    background: var(--ugg-card-hover);
}

.slot-role {
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: var(--ugg-text-secondary);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.slot-champion {
    flex: 1;
}

.empty-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border: 1px dashed var(--ugg-border);
    border-radius: 4px;
    color: var(--ugg-text-tertiary);
    transition: all 0.2s ease;
    font-size: 1.5rem;
}

.champion-slot:hover .empty-slot {
    border-color: var(--ugg-blue);
    color: var(--ugg-blue);
}

.champion-filled {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--ugg-bg-tertiary);
    border-radius: 4px;
    border: 1px solid var(--ugg-border);
}

.champion-filled img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid var(--ugg-blue);
}

.champion-filled span {
    flex: 1;
    font-weight: 600;
    color: var(--ugg-text-primary);
    font-size: 0.875rem;
}

.champion-filled .clear-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.champion-filled .clear-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* ===================================================================
   Recommendations Panel - Design moderne
=================================================================== */
.recommendations-panel {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 2rem;
}

.recommendations-panel .card-header {
    background: transparent;
    border: none;
    padding: 0 0 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.recommendations-panel .card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.recommendations-panel .card-body {
    padding: 0;
}

.role-filter {
    max-width: 180px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.recommendation-card {
    background: var(--ugg-card-bg);
    border: 1px solid var(--ugg-border);
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.recommendation-card:hover {
    border-color: var(--ugg-blue);
    transform: translateY(-2px);
}

.recommendation-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.recommendation-header img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid var(--ugg-border);
}

.recommendation-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--ugg-text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
}

.recommendation-reason {
    margin: 0;
    color: var(--ugg-text-secondary);
    font-size: 0.8125rem;
}

.recommendation-score {
    margin-bottom: 0.5rem;
}

.score-label {
    color: var(--ugg-text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
    font-weight: 500;
}

.score-bar {
    height: 4px;
    background: var(--ugg-bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.375rem;
}

.score-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.score-fill.excellent {
    background: linear-gradient(90deg, #10b981 0%, #22c55e 100%);
}

.score-fill.good {
    background: linear-gradient(90deg, var(--ugg-blue) 0%, var(--ugg-cyan) 100%);
}

.score-fill.average {
    background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

.score-value {
    text-align: right;
    color: var(--ugg-text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.no-recommendations {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ugg-text-tertiary);
    grid-column: 1 / -1;
    background: transparent;
}

.no-recommendations i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.5;
}

.no-recommendations p {
    margin: 0;
    font-size: 0.875rem;
}

/* ===================================================================
   Composition Summary - Layout en ligne
=================================================================== */
.composition-summary {
    margin-top: 2rem;
    background: transparent;
    border: none;
    padding: 0;
}

.composition-summary .card-header {
    background: transparent;
    border: none;
    padding: 0 0 1rem 0;
}

.composition-summary .card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.composition-summary .card-body {
    padding: 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.summary-item {
    background: var(--ugg-card-bg);
    border: 1px solid var(--ugg-border);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.summary-item:hover {
    border-color: var(--ugg-blue);
}

.summary-label {
    color: var(--ugg-text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-weight: 500;
}

.summary-label i {
    color: var(--ugg-blue);
    font-size: 1rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ugg-text-primary);
}

.damage-bar {
    margin-top: 0.75rem;
    height: 8px;
    background: var(--ugg-bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.ad-bar {
    background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
    transition: width 0.5s ease;
}

.ap-bar {
    background: linear-gradient(90deg, var(--ugg-blue) 0%, var(--ugg-cyan) 100%);
    transition: width 0.5s ease;
}

/* ===================================================================
   Pool Selector Modal
=================================================================== */
.pool-champions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem;
}

.pool-champion-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: var(--ugg-card-bg);
    border: 2px solid var(--ugg-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pool-champion-card:hover {
    border-color: var(--ugg-blue);
    transform: translateY(-2px);
    background: var(--ugg-card-hover);
}

.pool-champion-card img {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.pool-champion-card span {
    font-size: 0.8125rem;
    text-align: center;
    color: var(--ugg-text-primary);
    font-weight: 500;
    line-height: 1.2;
}

.pool-champion-card.selected {
    border-color: var(--ugg-cyan);
    background: rgba(0, 191, 214, 0.1);
}

.pool-champion-card .selection-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ugg-bg-tertiary);
    border: 2px solid var(--ugg-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pool-champion-card.selected .selection-indicator {
    background: var(--ugg-cyan);
    border-color: var(--ugg-cyan);
}

.pool-champion-card.selected .selection-indicator::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ===================================================================
   Champion Selector Modal
=================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--ugg-bg-secondary);
    border: 1px solid var(--ugg-border);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 900px;
    max-height: 85vh;
    width: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

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

.modal-title {
    margin: 0;
    color: var(--ugg-text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: var(--ugg-bg-tertiary);
    border: 1px solid var(--ugg-border);
    color: var(--ugg-text-primary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
}

.champions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem;
}

.champions-grid .champion-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: var(--ugg-card-bg);
    border: 1px solid var(--ugg-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.champions-grid .champion-card:hover {
    border-color: var(--ugg-blue);
    transform: translateY(-2px);
    background: var(--ugg-card-hover);
}

.champions-grid .champion-card img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.champions-grid .champion-card span {
    font-size: 0.8125rem;
    text-align: center;
    color: var(--ugg-text-primary);
    font-weight: 500;
    line-height: 1.2;
}

/* ===================================================================
   Form Elements
=================================================================== */
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--ugg-card-bg);
    border: 1px solid var(--ugg-border);
    border-radius: 6px;
    color: var(--ugg-text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--ugg-blue);
    box-shadow: 0 0 0 3px rgba(83, 131, 232, 0.1);
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--ugg-card-bg);
    border: 1px solid var(--ugg-border);
    border-radius: 6px;
    color: var(--ugg-text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--ugg-blue);
    box-shadow: 0 0 0 3px rgba(83, 131, 232, 0.1);
}

.form-input::placeholder {
    color: var(--ugg-text-tertiary);
}

/* ===================================================================
   Cards
=================================================================== */
.card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.card-header {
    padding: 0 0 1rem 0;
    border-bottom: none;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--ugg-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i {
    color: var(--ugg-blue);
}

.card-body {
    padding: 0;
}

/* ===================================================================
   Layout
=================================================================== */
.main-content {
    padding: 2rem 1rem;
    min-height: calc(100vh - var(--topbar-height, 60px));
    background: transparent;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    background: transparent;
}

/* ===================================================================
   Scrollbar Styling
=================================================================== */
.modal-body::-webkit-scrollbar,
.champions-grid::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track,
.champions-grid::-webkit-scrollbar-track {
    background: var(--ugg-bg-tertiary);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb,
.champions-grid::-webkit-scrollbar-thumb {
    background: var(--ugg-blue);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.champions-grid::-webkit-scrollbar-thumb:hover {
    background: var(--ugg-blue-light);
}

/* ===================================================================
   Responsive Design
=================================================================== */
@media (max-width: 1200px) {
    .roles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .roles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .recommendations-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .champions-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0 1.5rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .champion-slot {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .slot-role {
        width: 100%;
    }

    .recommendations-panel .card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .role-filter {
        max-width: 100%;
    }

    .roles-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   Animations
=================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.3s ease forwards;
}

/* ===================================================================
   Utility Classes
=================================================================== */
.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 2rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--ugg-blue) 0%, var(--ugg-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.me-2 {
    margin-right: 0.5rem;
}

/* ===================================================================
   Toast Notifications
=================================================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--ugg-card-bg);
    border: 1px solid var(--ugg-border);
    border-radius: 6px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 3000;
    box-shadow: var(--ugg-shadow-lg);
    animation: slideInRight 0.3s ease;
}

.toast i {
    font-size: 1.25rem;
}

.toast-success {
    border-left: 3px solid #10b981;
}

.toast-success i {
    color: #10b981;
}

.toast-error {
    border-left: 3px solid #ef4444;
}

.toast-error i {
    color: #ef4444;
}

.toast-warning {
    border-left: 3px solid #f59e0b;
}

.toast-warning i {
    color: #f59e0b;
}

.toast-info {
    border-left: 3px solid var(--ugg-blue);
}

.toast-info i {
    color: var(--ugg-blue);
}

.toast span {
    color: var(--ugg-text-primary);
    font-size: 0.875rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}
