/* ============================================
   CyberScan Pro - Styles
   Version: 2.0
   ============================================ */

/* ============================================
   CSS Variables - Theme Configuration
   ============================================ */
:root {
    /* Light Mode - Default */
    --bg-primary: #EDF2FA;
    --bg-secondary: #E4EAF4;
    --bg-tertiary: #FFFFFF;
    --bg-card: #FFFFFF;
    --accent-primary: #7B5BF2;
    --accent-secondary: #6347d9;
    --accent-glow: rgba(123, 91, 242, 0.3);
    --menu-color: #D9184D;
    --text-primary: #2F2E2E;
    --text-secondary: #8D8D85;
    --text-muted: #a8a8a0;
    --border-color: #dde3ed;
    --danger: #D9184D;
    --warning: #f59e0b;
    --info: #8D8D85;
    --success: #7B5BF2;
    --purple: #7B5BF2;
    --gradient-primary: linear-gradient(135deg, #7B5BF2 0%, #9171f8 100%);
    --gradient-bg: linear-gradient(180deg, #EDF2FA 0%, #E4EAF4 100%);
    --table-header: #F5F8FC;
    --input-bg: #FFFFFF;
    --toast-bg: rgba(255, 255, 255, 0.95);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0a0e14;
    --bg-secondary: #111820;
    --bg-tertiary: #1a222d;
    --bg-card: #151c25;
    --accent-primary: #7B5BF2;
    --accent-secondary: #9171f8;
    --accent-glow: rgba(123, 91, 242, 0.4);
    --menu-color: #D9184D;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    --border-color: #21262d;
    --danger: #D9184D;
    --warning: #f59e0b;
    --info: #8D8D85;
    --success: #7B5BF2;
    --purple: #7B5BF2;
    --gradient-primary: linear-gradient(135deg, #7B5BF2 0%, #9171f8 100%);
    --gradient-bg: linear-gradient(180deg, #0a0e14 0%, #111820 100%);
    --table-header: #1a222d;
    --input-bg: #1a222d;
    --toast-bg: rgba(21, 28, 37, 0.95);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   Background Animations
   ============================================ */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.2; }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(123, 91, 242, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(123, 91, 242, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Container
   ============================================ */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   Header
   ============================================ */
.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #FFFFFF;
    box-shadow: 0 4px 20px rgba(123, 91, 242, 0.4);
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(123, 91, 242, 0.4); }
    50% { box-shadow: 0 4px 35px rgba(123, 91, 242, 0.6); }
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Warning Banner
   ============================================ */
.warning-banner {
    background: rgba(217, 24, 77, 0.08);
    border: 1px solid rgba(217, 24, 77, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.warning-banner i {
    color: #D9184D;
    font-size: 1.2rem;
}

.warning-banner span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.card:hover {
    border-color: rgba(123, 91, 242, 0.4);
    box-shadow: 0 8px 30px rgba(123, 91, 242, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header i {
    color: var(--accent-primary);
    font-size: 1.3rem;
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* ============================================
   Form Elements
   ============================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

label i {
    color: var(--accent-primary);
    font-size: 0.85rem;
}

input, select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(123, 91, 242, 0.15);
}

input::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237B5BF2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 45px;
}

/* ============================================
   Scan Type Cards
   ============================================ */
.scan-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.scan-type-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.scan-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scan-type-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 91, 242, 0.15);
}

.scan-type-card.active {
    border-color: var(--accent-primary);
    background: rgba(123, 91, 242, 0.1);
}

.scan-type-card.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.scan-type-card .icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

.scan-type-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.scan-type-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.scan-type-card .time-estimate {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    background: rgba(123, 91, 242, 0.12);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(123, 91, 242, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(123, 91, 242, 0.45);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(123, 91, 242, 0.1);
}

.btn-danger {
    background: rgba(217, 24, 77, 0.1);
    color: #D9184D;
    border: 1px solid #D9184D;
}

.btn-danger:hover {
    background: #D9184D;
    color: white;
}

.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ============================================
   Progress Section
   ============================================ */
.progress-section {
    display: none;
    margin-top: 25px;
}

.progress-section.active {
    display: block;
}

.progress-bar-container {
    background: var(--bg-secondary);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.progress-info .status {
    color: var(--accent-primary);
}

.progress-info .percentage {
    color: var(--text-secondary);
}

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(123, 91, 242, 0.12);
}

.stat-card .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.stat-card .stat-icon.open { color: #7B5BF2; }
.stat-card .stat-icon.closed { color: #D9184D; }
.stat-card .stat-icon.filtered { color: #f59e0b; }
.stat-card .stat-icon.time { color: #8D8D85; }
.stat-card .stat-icon.total { color: #7B5BF2; }

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-card .stat-percentage {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ============================================
   Results Table
   ============================================ */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.results-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-count {
    background: var(--bg-tertiary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(123, 91, 242, 0.1);
}

.filter-btn .count {
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding-left: 40px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

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

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--table-header);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

tr:hover {
    background: rgba(123, 91, 242, 0.04);
}

tr:last-child td {
    border-bottom: none;
}

.port-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--accent-primary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.open {
    background: rgba(123, 91, 242, 0.12);
    color: #7B5BF2;
}

.status-badge.closed {
    background: rgba(217, 24, 77, 0.1);
    color: #D9184D;
}

.status-badge.filtered {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.service-name {
    color: #7B5BF2;
    font-weight: 500;
}

.response-time {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.vulnerability-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vuln-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.vuln-badge.critical {
    background: rgba(217, 24, 77, 0.12);
    color: #D9184D;
}

.vuln-badge.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.vuln-badge.safe {
    background: rgba(123, 91, 242, 0.12);
    color: #7B5BF2;
}

/* ============================================
   Export Section
   ============================================ */
.export-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-btn {
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(123, 91, 242, 0.1);
}

/* ============================================
   History Section
   ============================================ */
.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.history-item:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(123, 91, 242, 0.15);
}

.history-item .info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-item .host {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-primary);
    font-weight: 500;
}

.history-item .meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.history-actions .export-btn {
    padding: 8px 12px;
    min-width: auto;
}

.saved-notes {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
    font-style: italic;
}

.saved-notes i {
    margin-right: 5px;
    color: #f59e0b;
}

.saved-item {
    border-left: 3px solid #7B5BF2;
}

.history-item .stats {
    display: flex;
    gap: 15px;
}

.history-item .stat {
    text-align: center;
}

.history-item .stat-num {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.history-item .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Recommendations
   ============================================ */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.recommendation-item.critical {
    border-left-color: #D9184D;
    background: rgba(217, 24, 77, 0.08);
}

.recommendation-item.warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.recommendation-item.info {
    border-left-color: #8D8D85;
    background: rgba(141, 141, 133, 0.08);
}

.recommendation-item i {
    font-size: 1.2rem;
}

.recommendation-item.critical i { color: #D9184D; }
.recommendation-item.warning i { color: #f59e0b; }
.recommendation-item.info i { color: #8D8D85; }

.recommendation-content h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.recommendation-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   Charts
   ============================================ */
.chart-container {
    height: 250px;
    position: relative;
}

.pie-chart {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
    display: flex;
    gap: 5px;
    background: var(--bg-secondary);
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: var(--accent-primary);
    color: #FFFFFF;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(123, 91, 242, 0.35);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(123, 91, 242, 0.5);
}

.theme-toggle i {
    font-size: 1.3rem;
    color: #FFFFFF;
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

/* ============================================
   Disclaimer Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: rgba(217, 24, 77, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    border: 2px solid rgba(217, 24, 77, 0.3);
}

.modal-icon i {
    font-size: 2.5rem;
    color: #D9184D;
}

.modal h2 {
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.modal .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #D9184D;
}

.modal-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.modal-content p:last-child {
    margin-bottom: 0;
}

.modal-content strong {
    color: var(--text-primary);
}

.modal-content ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.modal-content ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-content ul li i {
    color: #D9184D;
    margin-top: 3px;
}

.modal-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    cursor: pointer;
}

.modal-checkbox input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.modal-checkbox label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.modal-buttons .btn {
    flex: 1;
}

.btn-accept {
    background: var(--gradient-primary);
    color: #FFFFFF;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-accept:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(123, 91, 242, 0.45);
}

.btn-accept:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-decline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-decline:hover {
    border-color: #D9184D;
    color: #D9184D;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(123, 91, 242, 0.1);
    color: var(--accent-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.legal-badge i {
    font-size: 0.8rem;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    min-width: 300px;
    background: var(--toast-bg);
    backdrop-filter: blur(10px);
}

.toast.success {
    background: rgba(123, 91, 242, 0.1);
    border: 1px solid #7B5BF2;
    color: #7B5BF2;
}

.toast.error {
    background: rgba(217, 24, 77, 0.1);
    border: 1px solid #D9184D;
    color: #D9184D;
}

.toast.info {
    background: rgba(141, 141, 133, 0.1);
    border: 1px solid #8D8D85;
    color: #6b6b65;
}

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

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.8rem;
    }

    .header {
        padding: 20px 10px;
    }

    .card {
        padding: 15px;
    }

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

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    th, td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .history-item .stats {
        width: 100%;
        justify-content: space-around;
    }

    .history-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Mobile Modal Responsive */
@media (max-width: 600px) {
    .modal-overlay {
        padding: 10px;
        align-items: flex-start;
    }

    .modal {
        padding: 25px 20px;
        border-radius: 16px;
        max-height: calc(100vh - 20px);
        margin: 10px auto;
    }

    .modal-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }

    .modal-icon i {
        font-size: 1.8rem;
    }

    .modal h2 {
        font-size: 1.25rem;
    }

    .modal .subtitle {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .modal-content {
        padding: 15px;
        margin-bottom: 20px;
    }

    .modal-content p {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .modal-content ul li {
        font-size: 0.85rem;
    }

    .modal-checkbox {
        margin-bottom: 20px;
    }

    .modal-checkbox label {
        font-size: 0.85rem;
    }

    .modal-buttons {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .modal-buttons .btn-accept,
    .modal-buttons .btn-decline {
        width: 100%;
        padding: 14px 20px;
    }

    .legal-badge {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}

@media (max-height: 700px) {
    .modal-overlay {
        align-items: flex-start;
        padding: 10px;
    }

    .modal {
        max-height: calc(100vh - 20px);
        margin: 10px auto;
    }

    .modal-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }

    .modal-icon i {
        font-size: 1.5rem;
    }

    .modal h2 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .modal .subtitle {
        margin-bottom: 15px;
    }

    .modal-content {
        padding: 12px;
        margin-bottom: 15px;
    }

    .modal-content ul {
        margin: 10px 0;
    }

    .modal-content ul li {
        margin-bottom: 8px;
    }
}
