/* styles.css - Cyber-Professional Theme (Standalone Pages) */

:root {
    /* Core Palette */
    --bg-color: #050505;
    --card-bg: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;

    /* Accents */
    --accent-primary: #0ABAB5;
    /* Tiffany Blue */
    --accent-glow: rgba(10, 186, 181, 0.3);
    --accent-hover: #08928E;

    /* Borders */
    --border-subtle: #222222;
    --border-focus: #333333;

    /* Status */
    --status-success: #00C853;
    --status-warning: #FFD600;
    --status-danger: #FF3D00;

    /* Legacy Compatibility */
    --fermata-black: var(--bg-color);
    --fermata-white: var(--text-primary);
    --fermata-tiffany: var(--accent-primary);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

/* Main Container (Card Style) */
.container {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    margin: 20px;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

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

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 180px;
    height: auto;
}

/* Buttons */
.btn {
    background: var(--accent-primary);
    color: #000000;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-glow);
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    margin-top: 12px;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    box-shadow: none;
}

/* Upload Area */
.file-upload-area {
    border: 2px dashed var(--border-focus);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.02);
}

.file-upload-area:hover {
    border-color: var(--accent-primary);
    background: rgba(10, 186, 181, 0.05);
    box-shadow: 0 0 20px rgba(10, 186, 181, 0.1);
}

.file-upload-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(10, 186, 181, 0.1);
    transform: scale(1.02);
}

.file-upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.drop-zone-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.drop-zone-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Mode Toggles */
.mode-toggle-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 10px;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mode-btn.mode-btn-active {
    background: var(--card-bg);
    color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mode-btn:hover:not(.mode-btn-active) {
    color: var(--text-primary);
}

/* File List */
.files-list-container {
    display: none;
    margin-top: 24px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
}

.files-list-container.active {
    display: block;
}

.file-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.file-item:hover {
    border-color: var(--border-focus);
    background: rgba(255, 255, 255, 0.05);
}

.file-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.file-item-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-item-size {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.file-remove-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 61, 0, 0.1);
    color: var(--status-danger);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-remove-btn:hover {
    background: var(--status-danger);
    color: #fff;
    transform: scale(1.1);
}

.file-item-status {
    font-size: 0.8rem;
    color: var(--accent-primary);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    width: 0%;
    max-width: 100%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Fallback Buttons */
.file-browse-fallback-container {
    text-align: center;
    margin: 20px 0;
}

.file-browse-fallback {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.file-browse-fallback:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.file-browse-fallback-subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 8px;
}

/* User Info */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.user-info strong {
    color: var(--accent-primary);
}

.logout-link {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.logout-link:hover {
    color: var(--status-danger);
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 0.9rem;
}

.message.error {
    background: rgba(255, 61, 0, 0.1);
    color: var(--status-danger);
    border: 1px solid rgba(255, 61, 0, 0.2);
}

.message.success {
    background: rgba(0, 200, 83, 0.1);
    color: var(--status-success);
    border: 1px solid rgba(0, 200, 83, 0.2);
}

/* Utilities */
.hidden {
    display: none !important;
}

.btn-hidden {
    display: none;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

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

/* Security Badge */
.security-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.security-badge:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Success Page Specifics */
.success-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 200, 83, 0.1);
    color: var(--status-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 24px auto;
    box-shadow: 0 0 20px rgba(0, 200, 83, 0.2);
}

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
}

.results-table th {
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}

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

/* Auth Section */
.auth-section {
    display: none;
}

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

.auth0-info {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.auth0-info strong {
    color: var(--text-primary);
}