/* Variables CSS */
:root {
    --primary-color: #6366f1;
    --accent-color: #f59e0b;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-white: #f8fafc;
    --text-gray: #cbd5e1;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gold-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Header */
.header {
    padding: 2rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-white);
    transform: translateY(-2px);
}

.logo-section {
    text-align: center;
    flex: 1;
}

.header-logo {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.logo-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.logo-section p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

/* Config Section */
.config-section {
    margin-bottom: 3rem;
}

.config-container {
    display: flex;
    justify-content: center;
}

.config-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow);
    max-width: 600px;
    width: 100%;
}

.config-card h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-white);
}

.start-config label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-gray);
}

.input-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.input-row input {
    flex: 1;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-row input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-primary {
    padding: 1rem 2rem;
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* Session Info */
.session-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 15px;
}

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

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item .label {
    color: var(--text-gray);
    font-weight: 500;
}

.info-item .value {
    font-weight: 700;
    color: var(--text-white);
}

.status.active {
    color: var(--success-color);
}

/* Add Slot Section */
.add-slot-section {
    margin-bottom: 3rem;
}

.add-slot-container {
    display: flex;
    justify-content: center;
}

.add-slot-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 800px;
}

.add-slot-card h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.slot-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.input-group input {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.btn-add {
    padding: 1rem 2rem;
    background: var(--gold-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: fit-content;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
}

/* Stats Section */
.stats-section {
    margin-bottom: 3rem;
}

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

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.total-invested .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.total-bonus .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.break-even .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.profit-loss .stat-icon {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.stat-content h3 {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
}

.stat-value.positive {
    color: var(--success-color);
}

.stat-value.negative {
    color: var(--error-color);
}

/* Table Section */
.table-section {
    margin-bottom: 3rem;
}

.table-container {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.table-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-white);
}

.btn-clear {
    padding: 0.75rem 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #ef4444;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-clear:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.table-wrapper {
    overflow-x: auto;
}

.slots-table {
    width: 100%;
    border-collapse: collapse;
}

.slots-table th,
.slots-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.slots-table th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.slots-table td {
    color: var(--text-gray);
}

.slots-table .slot-name {
    color: var(--text-white);
    font-weight: 600;
}

.slots-table .multiplier {
    font-weight: 700;
}

.slots-table .multiplier.good {
    color: var(--success-color);
}

.slots-table .multiplier.bad {
    color: var(--error-color);
}

.btn-remove {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-phase {
    padding: 0.75rem 1.5rem;
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
}

.btn-phase:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.gain-input {
    padding: 0.5rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: var(--text-white);
    font-size: 0.9rem;
    width: 100px;
    transition: all 0.3s ease;
}

.gain-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.8; }
}

/* Notifications */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-white);
}

.notification-success {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.notification-success i {
    color: var(--success-color);
}

.notification-error {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.notification-error i {
    color: var(--error-color);
}

.notification-warning {
    border-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
}

.notification-warning i {
    color: var(--warning-color);
}

.notification-info {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.notification-info i {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-section h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .slots-table {
        font-size: 0.9rem;
    }
}
