/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2E86AB;
    --primary-dark: #1B5E7A;
    --primary-light: #4FA3C7;
    --secondary: #A23B72;
    --secondary-light: #B85A8C;
    --dark: #121212;
    --dark-surface: #1E1E1E;
    --dark-card: #2D2D2D;
    --light: #FFFFFF;
    --light-surface: #F5F5F5;
    --light-card: #FFFFFF;
    --text-dark: #121212;
    --text-light: #FFFFFF;
    --text-muted: #666666;
    --success: #34C759;
    --warning: #FF9500;
    --error: #FF3B30;
    --border: #E0E0E0;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'SF Mono', Monaco, Inconsolata, 'Fira Code', 'Fira Mono', monospace;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background: var(--primary);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.logo-text {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-text span {
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.9;
    margin-left: 5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: var(--primary);
    color: white;
    padding: 4rem 5%;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><text x="10" y="20" font-size="14">🧮</text><text x="80" y="80" font-size="14">📱</text><text x="30" y="90" font-size="14">⚡</text></svg>');
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.hero-image {
    text-align: center;
}

.calculator-preview {
    background: var(--dark);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    margin: 0 auto;
}

.calc-display {
    background: var(--dark-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: right;
    color: white;
    font-family: var(--font-mono);
}

.calc-expression {
    font-size: 1rem;
    color: var(--text-muted);
    min-height: 1.5rem;
}

.calc-result {
    font-size: 2.5rem;
    font-weight: 300;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-btn {
    background: var(--dark-card);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.calc-btn.operator {
    background: var(--warning);
}

.calc-btn.function {
    background: var(--secondary);
}

.calc-btn.equals {
    background: var(--success);
    grid-column: span 2;
}

/* Features Section */
.features {
    padding: 5rem 5%;
    background: var(--light-surface);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--light-card);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.feature-description {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Legal Pages Styles */
.legal-header {
    background: var(--primary);
    color: white;
    padding: 3rem 5%;
    text-align: center;
}

.legal-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.legal-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.legal-content {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 5%;
}

.legal-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.legal-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
}

.legal-section h3 {
    color: var(--secondary);
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}

.legal-section p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.legal-section ul,
.legal-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.legal-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.legal-section th,
.legal-section td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.legal-section th {
    background: var(--light-surface);
    font-weight: 600;
    color: var(--text-dark);
}

.legal-badge {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-align: right;
}

/* Privacy Policy Specific */
.privacy-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.highlight-card {
    background: var(--light-surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.highlight-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.highlight-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.highlight-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.data-table td:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.data-table td:last-child {
    color: var(--success);
}

/* Footer */
.footer {
    background: var(--primary);
    color: white;
    padding: 3rem 5% 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        text-align: center;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-badges {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-section {
        padding: 1.5rem;
    }
    
    .privacy-highlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .legal-section h3 {
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 3rem; }

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.logo-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.logo-text {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.9;
    margin-left: 5px;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .logo-icon img {
        width: 28px;
        height: 28px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-text span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .logo-icon img {
        width: 30px;
        height: 30px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-text span {
        font-size: 0.7rem;
    }
}