/* Customer Panel Styles */
:root {
    --primary-color: #e67e22;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gaming-accent: #9b59b6;
    --neon-green: #00ff88;
}

/* Global Customer Styles */
.customer-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.customer-login .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.customer-login .card-header {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%) !important;
    padding: 2rem;
    border-bottom: none;
}

.customer-login .card-header h3 {
    margin: 0;
    font-weight: 600;
}

.customer-login .card-body {
    padding: 2rem;
}

.customer-login .input-group-text {
    background: var(--light-color);
    border: 1px solid #e9ecef;
    color: var(--primary-color);
}

.customer-login .form-control {
    border-left: none;
    padding-left: 0.5rem;
}

.customer-login .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
    border-color: var(--primary-color);
}

.customer-login .btn-primary {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    border: none;
    padding: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.customer-login .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Customer Dashboard */
.customer-dashboard {
    background: var(--light-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.customer-header {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.customer-header .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.customer-header .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: color 0.3s ease;
}

.customer-header .nav-link:hover {
    color: white !important;
}

.customer-sidebar {
    background: white;
    min-height: calc(100vh - 76px);
    padding: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.customer-sidebar .nav {
    padding-top: 1rem;
}

.customer-sidebar .nav-link {
    color: var(--dark-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.customer-sidebar .nav-link:hover {
    background: var(--light-color);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.customer-sidebar .nav-link.active {
    background: var(--primary-color);
    color: white;
    border-left-color: var(--gaming-accent);
}

.customer-sidebar .nav-link i {
    width: 20px;
    margin-right: 0.5rem;
}

.main-content {
    padding: 2rem;
}

.main-content h1 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Tournament Cards */
.tournament-info {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1) 0%, rgba(243, 156, 18, 0.1) 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(230, 126, 34, 0.2);
}

.tournament-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tournament-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Statistics Cards */
.stat-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
}

.stat-content h3 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.stat-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Step Progress */
.step-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 2rem 0;
}

.step-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 1rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
}

.step.completed .step-label {
    color: var(--success-color);
}

/* Sortable Teams */
.sortable-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.sortable-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    background: white;
    cursor: move;
    transition: all 0.3s ease;
}

.sortable-item:last-child {
    border-bottom: none;
}

.sortable-item:hover {
    background: var(--light-color);
}

.sortable-item.sortable-drag {
    opacity: 0.5;
}

.seed-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.team-name {
    flex: 1;
    font-weight: 600;
    color: var(--dark-color);
}

.drag-handle {
    color: #6c757d;
    font-size: 1.2rem;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Tournament Management */
.tournament-bracket {
    overflow-x: auto;
    padding: 1rem;
}

.bracket-container {
    display: flex;
    gap: 2rem;
    min-width: fit-content;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 200px;
}

.round-title {
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1) 0%, rgba(243, 156, 18, 0.1) 100%);
    border-radius: 8px;
}

.match-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.match-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.team.winner {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%);
    border-color: var(--success-color);
    color: var(--success-color);
    font-weight: 600;
}

.team.pending {
    background: #f8f9fa;
    color: #6c757d;
    font-style: italic;
}

.team-name {
    flex: 1;
    font-weight: 500;
}

.vs {
    text-align: center;
    color: #6c757d;
    font-weight: 600;
    margin: 0.5rem 0;
}

.set-winner {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team:hover .set-winner {
    opacity: 1;
}

.match-result {
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
    border-radius: 8px;
    font-size: 0.9rem;
}

.match-updated {
    animation: matchUpdate 1s ease;
}

@keyframes matchUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1) 0%, rgba(243, 156, 18, 0.1) 100%);
    border-bottom: 1px solid rgba(230, 126, 34, 0.2);
    font-weight: 600;
    color: var(--primary-color);
}

/* Tables */
.table {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table th {
    background: var(--light-color);
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.table-hover tbody tr:hover {
    background: rgba(230, 126, 34, 0.05);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%);
    color: var(--success-color);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.1) 100%);
    color: var(--danger-color);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
    color: var(--warning-color);
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(52, 144, 220, 0.1) 100%);
    color: var(--info-color);
    border: 1px solid rgba(23, 162, 184, 0.2);
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 0.75rem;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
}

.form-label {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1) 0%, rgba(243, 156, 18, 0.1) 100%);
    border-bottom: 1px solid rgba(230, 126, 34, 0.2);
    border-radius: 15px 15px 0 0;
}

.modal-title {
    color: var(--primary-color);
    font-weight: 600;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    background: var(--light-color);
    border-radius: 0 0 15px 15px;
}

/* Settings Page */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(230, 126, 34, 0.2);
}

.logo-preview {
    max-width: 200px;
    max-height: 100px;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.logo-preview img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

.theme-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.theme-option {
    position: relative;
    cursor: pointer;
}

.theme-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.theme-preview {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.theme-option input[type="radio"]:checked + .theme-preview {
    border-color: var(--primary-color);
    background: rgba(230, 126, 34, 0.1);
}

.theme-preview:hover {
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .customer-sidebar {
        position: fixed;
        top: 76px;
        left: -100%;
        width: 250px;
        height: calc(100vh - 76px);
        transition: left 0.3s ease;
        z-index: 1000;
    }
    
    .customer-sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .bracket-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .bracket-round {
        min-width: 100%;
    }
    
    .tournament-actions {
        flex-direction: column;
    }
    
    .tournament-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .step-progress {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-progress::before {
        display: none;
    }
    
    .theme-selector {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.text-gaming {
    color: var(--gaming-accent) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%) !important;
}

.bg-gradient-gaming {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%) !important;
}

.shadow-gaming {
    box-shadow: 0 10px 30px rgba(155, 89, 182, 0.3) !important;
}

.border-gaming {
    border-color: var(--gaming-accent) !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-in-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.bounce-in {
    animation: bounceIn 0.6s ease-in-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}