/**
 * MailPhishing Platform - Main Styles
 * Version: 2.0.0
 * 
 * Colors:
 * - Primary: #022042
 * - Secondary: #06C2D0
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Brand Colors */
    --color-primary: #022042;
    --color-primary-dark: #011630;
    --color-primary-light: #033060;
    --color-secondary: #06C2D0;
    --color-secondary-dark: #05A5B1;
    --color-secondary-light: #E6F9FB;
    
    /* Status Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-info: #3B82F6;
    
    /* Neutrals */
    --color-white: #FFFFFF;
    --color-black: #0F172A;
    --color-gray-50: #F8FAFC;
    --color-gray-100: #F1F5F9;
    --color-gray-200: #E2E8F0;
    --color-gray-300: #CBD5E1;
    --color-gray-400: #94A3B8;
    --color-gray-500: #64748B;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1E293B;
    --color-gray-900: #0F172A;
    
    /* Backgrounds */
    --bg-body: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-section: #F8FAFC;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(2, 32, 66, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(2, 32, 66, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(2, 32, 66, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(2, 32, 66, 0.1);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: 150ms ease;
    --transition-slow: 300ms ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-gray-800);
    background-color: var(--bg-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-secondary-dark);
}

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--color-gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand img {
    height: 120px;
    width: auto;
}

.navbar-nav {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 70% 50%, var(--color-secondary) 0%, transparent 50%);
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

/* ============================================
   SEARCH SECTION
   ============================================ */
.search-section {
    max-width: 700px;
    margin: -2.5rem auto 0;
    position: relative;
    z-index: 10;
}

.search-form {
    display: flex;
    gap: 0.75rem;
    background: var(--color-white);
    padding: 0.75rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-gray-200);
}

.search-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    font-size: 1rem;
    background: transparent;
    outline: none;
    border-radius: var(--radius-lg);
    color: var(--color-gray-800);
}

.search-input::placeholder {
    color: var(--color-gray-400);
}

.search-btn {
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.search-btn:hover {
    background: var(--color-primary-light);
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   RESULTS SECTION - Minimalist Design
   ============================================ */
.results-section {
    padding: 1.5rem 1rem;
    display: none;
}

.results-section.show {
    display: block;
}

/* Minimalist compact result card */
.result-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-top: 0.75rem;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-compact.danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
}

.result-compact.safe {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
}

.result-compact.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.result-status-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.result-status-icon.danger {
    background: #ef4444;
    color: white;
}

.result-status-icon.safe {
    background: #22c55e;
    color: white;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-value {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    word-break: break-all;
}

.result-label {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.125rem;
}

.result-label.danger {
    color: #dc2626;
}

.result-label.safe {
    color: #16a34a;
}

.result-type {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    flex-shrink: 0;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
    padding: 5rem 0;
    background: var(--bg-section);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: var(--color-secondary-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.feature-desc {
    color: var(--color-gray-600);
    line-height: 1.6;
}

/* ============================================
   MISSION SECTION
   ============================================ */
.mission {
    padding: 5rem 0;
    background: var(--color-primary);
    color: var(--color-white);
    text-align: center;
}

.mission-content {
    max-width: 700px;
    margin: 0 auto;
}

.mission h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
}

.mission p {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 3rem 0;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-brand img {
    height: 130px;
    width: auto;
}

.footer-name {
    font-weight: 600;
    font-size: 1.125rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.footer-info {
    text-align: right;
}

.footer-info p {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-light);
    color: var(--color-white);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-secondary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-success {
    background: var(--color-success);
    color: var(--color-white);
}

.btn-danger {
    background: var(--color-danger);
    color: var(--color-white);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
}

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

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition);
    background: var(--color-white);
    color: var(--color-gray-800);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px var(--color-secondary-light);
}

.form-input::placeholder {
    color: var(--color-gray-400);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: var(--color-danger);
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.alert-success {
    background: #ECFDF5;
    border: 1px solid var(--color-success);
    color: #065F46;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid var(--color-danger);
    color: #991B1B;
}

.alert-warning {
    background: #FFFBEB;
    border: 1px solid var(--color-warning);
    color: #92400E;
}

.alert-info {
    background: #EFF6FF;
    border: 1px solid var(--color-info);
    color: #1E40AF;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-success { background: #D1FAE5; color: #065F46; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-secondary { background: var(--color-gray-200); color: var(--color-gray-700); }

/* ============================================
   PAGE HEADER (Frontend)
   ============================================ */
.page-header {
    padding: 4rem 0;
    background: var(--color-primary);
    color: var(--color-white);
    text-align: center;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--color-secondary);
    margin: 0.5rem 0 0 0;
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

[class*="col-"] {
    padding: 0 0.75rem;
    box-sizing: border-box;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

.offset-2 { margin-left: 16.666%; }
.offset-3 { margin-left: 25%; }
.offset-4 { margin-left: 33.333%; }

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--color-gray-500); }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }

.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.hidden { display: none; }

/* ============================================
   MANIFESTO SECTION
   ============================================ */
.manifesto-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.manifesto-header {
    text-align: center;
    margin-bottom: 4rem;
}

.manifesto-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.manifesto-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.manifesto-intro {
    font-size: 1.125rem;
    color: var(--color-gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.principle-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
}

.principle-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.principle-number {
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.principle-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.principle-card p {
    font-size: 0.9375rem;
    color: var(--color-gray-600);
    margin: 0;
    line-height: 1.6;
}

.manifesto-quote {
    text-align: center;
    padding: 2rem;
    background: var(--color-primary);
    border-radius: var(--radius-xl);
}

.manifesto-quote p {
    font-size: 1.25rem;
    color: var(--color-white);
    font-style: italic;
    margin: 0;
}

/* ============================================
   ABOUT PROJECT SECTION
   ============================================ */
.about-project {
    padding: 5rem 0;
    background: var(--color-white);
}

.about-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.about-text {
    font-size: 1.125rem;
    color: var(--color-gray-700);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-text a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
}

.about-text a:hover {
    text-decoration: underline;
}

.about-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.support-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-top: 2rem;
}

.support-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.support-section p {
    color: #a16207;
    margin-bottom: 1rem;
}

.btn-support {
    background: #f59e0b;
    color: var(--color-white);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-support:hover {
    background: #d97706;
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar .container {
        height: auto;
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .navbar-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 1rem 0;
        gap: 0.25rem;
    }
    
    .navbar-nav.show {
        display: flex;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .features {
        padding: 3rem 0;
    }
    
    .features h2 {
        font-size: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .mission {
        padding: 3rem 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .col-8, .col-6, .col-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .offset-2, .offset-3, .offset-4 {
        margin-left: 0;
    }
}