/* Core Stylesheet: Formulabiz Premium Glassmorphism Design System */

:root {
    --bg-dark: #090a0f;
    --card-bg: rgba(17, 18, 25, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --accent: #d946ef;
    --accent-glow: rgba(217, 70, 239, 0.3);
    --success: #10b981;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Floating blur background decorations */
.glow-blob {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    animation: float 25s infinite alternate;
}

.blob-1 {
    background-color: var(--primary);
    top: -150px;
    left: -150px;
}

.blob-2 {
    background-color: var(--accent);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 80px) scale(1.15); }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 6%;
    background: rgba(9, 10, 15, 0.5);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.logo-accent {
    background: linear-gradient(135deg, #6366f1, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.25s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

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

.btn-block {
    display: block;
    width: 100%;
    padding: 14px;
}

/* Main Layout */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 4% 100px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 70px;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.gradient-text {
    background: linear-gradient(135deg, #818cf8, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Glassmorphism Cards */
.card {
    border-radius: 16px;
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

/* Workspace Grid */
.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 80px;
}

@media (max-width: 900px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

/* Form controls */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

textarea, input[type="text"], input[type="email"], input[type="password"] {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

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

textarea:focus, input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* AI Results Box */
.result-container {
    margin-top: 28px;
    border-top: 1px solid var(--card-border);
    padding-top: 24px;
    animation: fadeIn 0.4s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-copy:hover {
    background: var(--primary);
}

.formula-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary-glow);
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.1rem;
    color: #a5b4fc;
    margin-bottom: 12px;
}

.explanation-box {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed var(--card-border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.25s ease;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
}

.upload-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.browse-link {
    color: var(--primary);
    text-decoration: underline;
}

.hidden-input {
    display: none;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.btn-remove {
    background: transparent;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 0.8rem;
}

/* Preview table */
.preview-container {
    margin-top: 24px;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
    animation: fadeIn 0.4s ease;
}

.preview-container h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.table-scroll {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
}

th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

/* Pricing section */
.pricing-section {
    text-align: center;
    margin-top: 40px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-card {
    text-align: left;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.15);
}

.badge {
    position: absolute;
    top: 20px;
    right: -30px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 30px;
    transform: rotate(45deg);
    text-transform: uppercase;
}

.tier-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.price {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.price-period {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.tier-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tier-features li::before {
    content: "✓ ";
    color: var(--primary);
    font-weight: bold;
    margin-right: 6px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 32px;
    position: relative;
    animation: scaleIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2000;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    animation: slideUp 0.3s ease;
}

/* Utility classes */
.hidden { display: none !important; }

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

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}
