:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --sidebar-width: 280px;
    --navbar-height: 70px;

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;

    --border-color: #334155;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar-container {
    max-width: 100%;
    height: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-brand i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--bg-tertiary);
}

.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

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

.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-login span {
    display: inline;
}

@media (max-width: 768px) {
    .btn-login span {
        display: none;
    }

    .btn-login {
        padding: 0.5rem;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
}


.theme-toggle {
    background: var(--bg-tertiary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
    transition: transform var(--transition-base);
    z-index: 999;
}

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

.sidebar-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-link i {
    font-size: 1.125rem;
    width: 20px;
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-md);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: white;
    border-radius: 0 4px 4px 0;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    padding: 2rem;
    min-height: calc(100vh - var(--navbar-height));
    transition: margin-left var(--transition-base);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Tool Sections */
.tool-section {
    display: none;
    animation: fadeIn var(--transition-base);
}

.tool-section.active {
    display: block;
}

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

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

.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Tool Container */
.tool-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.tool-input-section,
.tool-output-section {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    background: var(--bg-tertiary);
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-md);
}

/* Tab Content */
.tab-content {
    margin-bottom: 1.5rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn var(--transition-base);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

select.form-input {
    cursor: pointer;
}

.color-input {
    width: 100%;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-input:hover {
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
}

.char-counter {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Customization Section */
.customization-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.customization-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.customization-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-md);
    width: 100%;
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

/* QR Preview */
.qr-preview-card {
    position: sticky;
    top: 2rem;
}

.qr-preview-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.qr-preview {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    margin-bottom: 1.5rem;
}

.qr-placeholder {
    text-align: center;
    color: var(--text-tertiary);
}

.qr-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.qr-placeholder p {
    font-size: 0.9375rem;
}

#qrPreview canvas,
#qrPreview img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.qr-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(4px);
}

.overlay.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tool-container {
        grid-template-columns: 1fr;
    }

    .qr-preview-card {
        position: static;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
        --navbar-height: 60px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }

    .navbar-brand span {
        font-size: 1rem;
    }

    .section-header h1 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .tool-input-section,
    .tool-output-section {
        padding: 1.5rem;
    }

    .tabs {
        gap: 0.375rem;
    }

    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .customization-options {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Loading Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}


.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Financial Calculator Styles */
.financial-results {
    animation: fadeIn var(--transition-base);
}

.result-card.main-result {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-card));
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-card h1 {
    font-size: 2.5rem;
    margin-top: 0.5rem;
    font-weight: 800;
}

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

.result-item {
    background: var(--bg-tertiary);
    padding: 1.25rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform var(--transition-fast);
}

.result-item:hover {
    transform: translateY(-2px);
    background: var(--bg-secondary);
}

.result-item span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.result-item strong {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.text-success {
    color: var(--success-color) !important;
}

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

.text-primary {
    color: var(--primary-color) !important;
}

.financial-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--text-tertiary);
}


.financial-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Shipping Calculator Styles */
.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.address-helper {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.shipping-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    text-align: center;
    padding: 3rem;
}

.shipping-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.shipping-card {
    background: var(--bg-tertiary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform var(--transition-fast);
    border: 1px solid transparent;
}

.shipping-card:hover {
    transform: translateY(-2px);
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.shipping-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shipping-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.shipping-details h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.shipping-details p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.shipping-price {
    text-align: right;
}

.shipping-price h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.shipping-price span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Featured Option */
.shipping-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(to right, var(--bg-secondary), var(--bg-tertiary));
    position: relative;
}


.featured-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* PDF Tools Styles */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--bg-tertiary);
    margin-bottom: 1.5rem;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-zone p {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-zone small {
    color: var(--text-tertiary);
}

.file-list {
    margin-bottom: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-info i {
    color: var(--primary-color);
}

.file-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.file-remove:hover {
    opacity: 1;
}

.options-panel {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.options-panel .form-group {
    flex: 1;
    min-width: 150px;
}

/* Success Animation */
.success-animation {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.pdf-result {
    text-align: center;
    padding: 2rem;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
    }

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

/* AI Post Generator Styles */
.ai-form textarea {
    resize: none;
}

.magic-icon i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #FF0080, #7928CA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: float 3s ease-in-out infinite;
}

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

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

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

.post-result {
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.generated-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.generated-image-container {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    aspect-ratio: 1/1;
    /* Default square */
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.generated-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.generated-image-container:hover img {
    transform: scale(1.02);
}

.download-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.generated-image-container.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    z-index: 10;
}

.generated-image-container.loading::before {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.generated-image-container img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.generated-image-container img.loaded {
    opacity: 1;
}

.generated-caption-container {
    background: var(--bg-tertiary);
    border-radius: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.caption-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.caption-text {
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    padding: 0;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
    background: linear-gradient(135deg, #FF0080, #7928CA);
    border: none;
}

.btn-lg:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(121, 40, 202, 0.4);
}

/* Login Modal Styles - Right Sidebar Panel */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 10000;
}

.modal.active {
    display: block;
}

.modal-content {
    position: fixed;
    top: 0;
    right: -450px;
    height: 100vh;
    width: 100%;
    max-width: 450px;
    background: var(--bg-primary);
    padding: 2rem;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
}

.modal.active .modal-content {
    right: 0;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        right: -100%;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-tertiary);
    transition: all 0.3s ease;
}

.auth-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.auth-subtitle {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-auth {
    background: #1e3a8a;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-auth:hover {
    background: #1e40af;
}

.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}

.forgot-password {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-password:hover {
    color: var(--primary-color);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #3c4043;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google img {
    width: 18px;
    height: 18px;
}

/* Text Tools Styles */
.text-result {
    animation: fadeIn 0.3s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.result-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.result-textarea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 300px;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.text-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    color: var(--text-tertiary);
    text-align: center;
    padding: 3rem;
}

.text-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.btn-icon {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

#text-corrector-counter {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}