/* Numerology App Main Stylesheet */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.display-4 {
    font-weight: 700;
    line-height: 1.2;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(99, 102, 241, 0.95) !important;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-section::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"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="90" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="30" r="1" fill="white" opacity="0.1"/><circle cx="30" cy="70" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Form Section */
.form-section {
    background: var(--bg-light);
    padding: 4rem 0;
}

.form-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.form-control {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.875rem 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

/* Cards */
.how-it-works-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.how-it-works-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 2rem;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.feature-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-content p {
    margin: 0;
    color: var(--text-muted);
}

/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    height: 100%;
    transition: var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stars {
    color: var(--accent-color);
    font-size: 1.125rem;
}

.testimonial-author {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.testimonial-author strong {
    color: var(--text-dark);
    display: block;
}

.testimonial-author span {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* About Section */
.about-stats {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 2rem;
}

.stat-item h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.stat-item p {
    color: var(--text-muted);
    font-weight: 500;
}

/* Result Page Styles */
.result-hero {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 76px;
}

.result-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.number-display {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.trait-list {
    list-style: none;
    padding: 0;
}

.trait-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
}

.trait-list li:last-child {
    border-bottom: none;
}

.trait-list i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    width: 20px;
}

.career-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.career-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
}

.career-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.lucky-elements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.lucky-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.lucky-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.lucky-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.lucky-value {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.footer h5, .footer h6 {
    color: white;
}

.footer a {
    transition: var(--transition);
    text-decoration: none;
}

.footer a:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.newsletter-form .input-group {
    margin-top: 1rem;
}

.newsletter-form .form-control {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */

/* Tablet and below */
@media (max-width: 768px) {
    body {
        padding-top: 60px; /* Account for fixed navbar */
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .hero-section {
        text-align: center;
        padding-top: 80px;
        min-height: auto;
        padding-bottom: 3rem;
    }

    .hero-content {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .display-4 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .lead {
        font-size: 1rem;
    }

    .form-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }

    .form-section {
        padding: 3rem 1rem;
    }

    .feature-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .how-it-works-card {
        padding: 1.5rem;
    }

    .career-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .lucky-elements {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .result-hero {
        padding: 2.5rem 1rem 1.5rem;
        margin-top: 60px;
    }

    .result-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .stat-item h3 {
        font-size: 1.5rem;
    }

    .about-stats {
        padding: 1.5rem;
    }

    /* Footer mobile */
    .footer {
        padding: 2rem 1rem;
    }

    .social-links a {
        width: 44px;
        height: 44px;
    }

    .newsletter-form .input-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-form .form-control,
    .newsletter-form .btn {
        width: 100%;
        border-radius: 8px !important;
    }
}

/* Mobile devices */
@media (max-width: 576px) {
    body {
        padding-top: 56px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .display-4 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .hero-section {
        padding-top: 60px;
        padding-bottom: 2rem;
    }

    .hero-features {
        margin-bottom: 1.5rem;
    }

    .feature-item {
        justify-content: center;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

    .form-card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .form-section {
        padding: 2rem 0.75rem;
    }

    .form-control {
        padding: 0.875rem 1rem;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: 48px; /* Touch-friendly */
    }

    .how-it-works-card,
    .testimonial-card {
        padding: 1.25rem;
    }

    .testimonial-card p {
        font-size: 0.95rem;
    }

    .number-display {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }

    .result-hero {
        padding: 2rem 1rem 1rem;
    }

    .result-hero h1 {
        font-size: 1.5rem;
    }

    .result-card {
        padding: 1.25rem;
    }

    .career-item {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    .lucky-item {
        padding: 0.875rem;
    }

    .lucky-value {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    .stat-item h3 {
        font-size: 1.25rem;
    }

    .stat-item p {
        font-size: 0.85rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.15rem; }
    h4 { font-size: 1.05rem; }
}

/* Small mobile devices */
@media (max-width: 400px) {
    body {
        padding-top: 52px;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .display-4 {
        font-size: 1.35rem;
    }

    .form-card {
        padding: 1rem;
    }

    .form-section {
        padding: 1.5rem 0.5rem;
    }

    .how-it-works-card,
    .testimonial-card {
        padding: 1rem;
    }

    .number-display {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .result-card {
        padding: 1rem;
    }

    .btn-primary {
        padding: 0.75rem 1.25rem;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-image img {
        animation: none;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    opacity: 0;
    animation: slideInLeft 0.6s ease-in-out forwards;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    opacity: 0;
    animation: slideInRight 0.6s ease-in-out forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.form-check-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .social-links {
        display: none !important;
    }
    
    .result-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}