/* Premium Design System for MCA SpamShield Project */

:root {
    /* Dark Mode (Default) Variables */
    --bg-main: #0f172a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border-card: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --nav-bg: rgba(15, 23, 42, 0.8);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --danger: #ef4444;
    --success: #22c55e;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides */
body.light-mode {
    --bg-main: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --border-card: rgba(0, 0, 0, 0.05);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --nav-bg: rgba(241, 245, 249, 0.8);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
}

.premium-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-premium);
}

/* Header & Nav */
.header_section {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-card);
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand span {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

#theme-toggle {
    color: var(--text-main) !important;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main) !important;
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Form Styles */
.textarea-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

textarea#message {
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-card);
    border-radius: 1rem;
    padding: 1.5rem;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    transition: var(--transition);
    outline: none;
}

body.light-mode textarea#message {
    background: rgba(255, 255, 255, 0.5);
}

textarea#message:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Premium Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-card);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 0.75rem;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

/* Prediction Result Premium */
.prediction-result {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.badge-spam {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.badge-ham {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.confidence-meter {
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin: 1.5rem 0;
    overflow: hidden;
}

body.light-mode .confidence-meter {
    background: rgba(0,0,0,0.05);
}

.confidence-bar {
    height: 100%;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-spam .confidence-bar { background: var(--danger); }
.badge-ham .confidence-bar { background: var(--success); }

/* Methodology Section */
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.method-card {
    background: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-card);
}

.method-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.method-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Spinner */
.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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