/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navigation */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.logout-btn {
    color: var(--danger-color) !important;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.breadcrumb {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* Search Bar */
.search-bar {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.sort-select,
.order-select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

.btn-secondary:hover {
    background-color: #475569;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.document-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.doc-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.doc-content {
    flex: 1;
    margin-bottom: 1rem;
}

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

.doc-filename {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.doc-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.doc-meta span {
    padding: 0.25rem 0.5rem;
    background: var(--bg-color);
    border-radius: 4px;
}

.doc-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-form,
.auth-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.file-input {
    padding: 0.5rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Document View */
.document-view {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.doc-view-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.doc-view-icon {
    font-size: 4rem;
}

.doc-view-info h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.doc-view-filename {
    color: var(--text-secondary);
    font-size: 1rem;
}

.doc-view-details {
    margin-bottom: 2rem;
}

.detail-row {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    min-width: 150px;
    color: var(--text-primary);
}

.detail-value {
    color: var(--text-secondary);
    flex: 1;
}

.doc-view-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Profile - Modern Redesign */
.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: profilePulse 4s ease-in-out infinite;
}

@keyframes profilePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.profile-header-info {
    flex: 1;
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.profile-email {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
}

.profile-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.9rem;
    opacity: 0.8;
}

.profile-header-actions {
    flex-shrink: 0;
}

/* Plan Card */
.profile-plan-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.plan-card-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.plan-icon-wrapper {
    font-size: 4rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: iconFloat 3s ease-in-out infinite;
}

.plan-info {
    flex: 1;
}

.plan-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.plan-upgrade {
    flex-shrink: 0;
}

.plan-usage-section {
    display: grid;
    gap: 1.5rem;
}

.usage-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.usage-label {
    font-weight: 600;
    color: var(--text-primary);
}

.usage-count {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.125rem;
}

.usage-progress {
    background: var(--border-color);
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.usage-progress-bar {
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.usage-percentage {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Statistics Grid - Modern Design */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card-modern {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-card-modern:hover::before {
    transform: scaleX(1);
}

.stat-card-documents::before {
    background: linear-gradient(90deg, #4f46e5, #6366f1);
}

.stat-card-storage::before {
    background: linear-gradient(90deg, #64748b, #475569);
}

.stat-card-plan::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-icon-wrapper {
    flex-shrink: 0;
}

.stat-icon-bg {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    overflow: hidden;
}

.stat-icon-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background: inherit;
}

.stat-icon-bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-icon-bg-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.stat-icon-bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.stat-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-body {
    margin-top: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-documents .stat-number {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-storage .stat-number {
    background: linear-gradient(135deg, #64748b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-plan .stat-number {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Account Details */
.profile-details-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.details-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-color);
    border-radius: 12px;
    transition: transform 0.2s;
}

.detail-item:hover {
    transform: translateX(4px);
}

.detail-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 10px;
    flex-shrink: 0;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Email handling for long addresses */
.detail-item-email {
    min-width: 0;
    /* Allows flex item to shrink */
}

.detail-value-email {
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    display: block;
    line-height: 1.5;
}

/* For very long emails, show ellipsis on single line if needed */
@media (max-width: 768px) {
    .detail-value-email {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    .detail-value-email:hover {
        white-space: normal;
        word-break: break-all;
        overflow: visible;
        position: relative;
        z-index: 10;
        background: var(--card-bg);
        padding: 0.5rem;
        border-radius: 6px;
        box-shadow: var(--shadow-md);
    }
}

.profile-actions {
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-form {
        flex-direction: column;
    }

    .search-input,
    .sort-select,
    .order-select {
        width: 100%;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .doc-view-header {
        flex-direction: column;
        text-align: center;
    }

    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .detail-label {
        min-width: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Landing Page Styles */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100px);
    }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(120deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.hero-visual {
    position: relative;
    height: 400px;
}

.floating-documents {
    position: relative;
    width: 100%;
    height: 100%;
}

.doc-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    font-size: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: floatCard 6s ease-in-out infinite;
}

.doc-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.doc-2 {
    top: 30%;
    right: 15%;
    animation-delay: 1s;
}

.doc-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

.doc-4 {
    top: 50%;
    right: 10%;
    animation-delay: 1.5s;
}

.doc-5 {
    bottom: 10%;
    right: 30%;
    animation-delay: 0.5s;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: var(--bg-color);
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

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

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

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

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5), 0 0 40px rgba(251, 191, 36, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(251, 191, 36, 0.5), 0 0 40px rgba(251, 191, 36, 0.3);
    }

    to {
        text-shadow: 0 0 30px rgba(251, 191, 36, 0.8), 0 0 60px rgba(251, 191, 36, 0.5), 0 0 80px rgba(251, 191, 36, 0.3);
    }
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* How It Works Section */
.how-it-works-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--bg-color) 0%, #ffffff 100%);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    flex-wrap: wrap;
    gap: 2rem;
}

.step-item {
    flex: 1;
    min-width: 250px;
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.step-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.step-icon {
    font-size: 4rem;
    margin: 1.5rem 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.step-connector {
    flex: 0 0 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: none;
}

.step-connector::after {
    content: '→';
    position: absolute;
    right: -15px;
    top: -12px;
    color: #667eea;
    font-size: 1.5rem;
}

/* Supported Formats Section */
.formats-section {
    padding: 6rem 0;
    background: var(--card-bg);
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.format-item {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--bg-color);
    border-radius: 12px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.format-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    background: var(--card-bg);
}

.format-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.format-item:hover .format-icon {
    animation: bounce 0.6s ease-in-out;
    transform: scale(1.2);
}

.format-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Benefits Section */
.benefits-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.benefits-text {
    max-width: 600px;
}

.benefit-list {
    margin-top: 2rem;
}

.benefit-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.benefit-check {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    animation: checkPulse 2s ease-in-out infinite;
}

@keyframes checkPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    }
}

.benefit-text-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.benefit-text-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.benefits-visual {
    position: relative;
    height: 400px;
}

.benefits-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-benefit-icon {
    position: absolute;
    font-size: 4rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    animation: floatBenefit 4s ease-in-out infinite;
}

.icon-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.icon-2 {
    top: 30%;
    right: 15%;
    animation-delay: 1s;
}

.icon-3 {
    bottom: 30%;
    left: 15%;
    animation-delay: 2s;
}

.icon-4 {
    bottom: 10%;
    right: 10%;
    animation-delay: 1.5s;
}

@keyframes floatBenefit {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Pricing Section */
.pricing-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-color) 100%);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.pricing-card-featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.pricing-card-featured:hover {
    transform: scale(1.08) translateY(-10px);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    }
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.plan-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.plan-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

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

.pricing-features {
    flex: 1;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.feature-text {
    color: var(--text-primary);
    font-size: 1rem;
}

.pricing-cta {
    margin-top: auto;
}

.pricing-card-featured .price-amount {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: var(--card-bg);
}

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

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slide-in {
    animation: slideIn 1s ease-out;
}

.animate-count-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-slide-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-fade-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: slideInRight 0.8s ease-out;
}

/* Responsive Design for Landing Page */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-visual {
        height: 300px;
    }

    .doc-card {
        font-size: 2rem;
        padding: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .stat-value {
        font-size: 2.5rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .hero-cta,
    .cta-buttons {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }

    .steps-container {
        flex-direction: column;
    }

    .step-connector {
        display: none;
    }

    .benefits-content {
        grid-template-columns: 1fr;
    }

    .benefits-visual {
        height: 300px;
        margin-top: 2rem;
    }

    .formats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .pricing-card-featured {
        transform: scale(1);
    }

    .pricing-card-featured:hover {
        transform: translateY(-10px) scale(1.02);
    }

    .price-amount {
        font-size: 2.5rem;
    }

    .plan-icon {
        font-size: 3rem;
    }

    /* Profile Responsive */
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .profile-header-actions {
        width: 100%;
    }

    .profile-header-actions .btn {
        width: 100%;
    }

    .plan-card-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .plan-upgrade {
        width: 100%;
    }

    .plan-upgrade .btn {
        width: 100%;
    }

    .profile-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card-modern {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-icon-bg {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .profile-name {
        font-size: 2rem;
    }

    .avatar-circle {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
}