:root {
    /* Main Theme Colors - Rolex Inspired */
    --primary-color: #006039;       /* Rolex Green */
    --primary-hover: #004d2e;       /* Darker Green */
    --secondary-color: #A37E2C;     /* Rolex Gold */
    
    /* Background & Surface Colors */
    --background-color: #f4f7f6;    /* Global background */
    --surface-color: #ffffff;       /* Card/Container background */
    
    /* Text Colors */
    --text-main: #333333;           /* Primary text */
    --text-secondary: #666666;      /* Muted/Secondary text */
    --text-inverse: #ffffff;        /* Text on dark backgrounds */
    
    /* Status Colors */
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;

    /* Spacing & Layout */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Borders & Radius */
    --border-radius: 8px;
    --border-color: #e1e1e1;
    
    /* Typography */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Global Reset & Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Common Component Styles */

/* Buttons */
button {
    background-color: var(--primary-color);
    color: var(--text-inverse);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--primary-hover);
}

/* Form Inputs */
input {
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    width: 100%; /* Default to full width in containers */
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.text-error {
    color: var(--error-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* Login Specific Styles (using variables) */
.login-container {
    background-color: var(--surface-color);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: var(--spacing-xl) auto; /* Center horizontally */
    text-align: center;
}

.form-group {
    margin-bottom: var(--spacing-md);
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

/* Glassmorphism UI */
.glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.glass-input {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    backdrop-filter: blur(4px);
}

/* Paper Preview Modal */
.paper-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10000;
    width: 90%;
    height: 85%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.paper-content {
    background: white;
    color: black;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-family: 'Times New Roman', serif;
    line-height: 1.8;
    min-height: 500px;
    max-height: 800px; /* Limit height */
    overflow-y: auto; /* Enable scrolling */
}

/* Empty state */
.empty-papers {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-papers svg {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.empty-papers h3 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.empty-papers p {
    margin: 0 0 24px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    overflow: hidden;
}

.view-toggle button {
    background: var(--bg-primary);
    border: none;
    padding: 8px 12px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    border-right: 1px solid var(--border-primary);
}

.view-toggle button:last-child {
    border-right: none;
}

.view-toggle button:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.view-toggle button.active {
    background: var(--primary-color);
    color: white;
}

.view-toggle svg {
    width: 14px;
    height: 14px;
}
