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

:root {
    --voxydocs-primary: #1e40af;
    --voxydocs-primary-dark: #1e3a8a;
    --voxydocs-primary-light: #3b82f6;
    --voxydocs-black: #1a1a1a;
    --voxydocs-accent-red: #ef4444;
    --voxydocs-accent-green: #10b981;
    --voxydocs-accent-blue: #3b82f6;
    --voxydocs-accent-purple: #8b5cf6;
    --bg: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f8fafc 100%);
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header - Enhanced */
.app-header {
    background: var(--card-bg);
    border-bottom: 3px solid var(--voxydocs-primary);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

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

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.logo-image {
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    transition: var(--transition);
    display: block;
}

.logo-image:hover {
    transform: scale(1.05);
}

.tagline {
    font-size: 9px;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-top: 0;
}

/* Responsive logo */
@media (max-width: 768px) {
    .logo-image {
        height: 28px;
        max-width: 120px;
    }
    
    .tagline {
        font-size: 8px;
    }
}

.header-nav {
    display: flex;
    gap: 12px;
}

.nav-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    border-color: var(--voxydocs-primary);
    color: var(--voxydocs-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--voxydocs-primary) 0%, var(--voxydocs-primary-dark) 100%);
    color: white;
    border-color: var(--voxydocs-primary);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 30px;
    animation: fadeIn 0.5s ease-out;
}

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

.view {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.view.active {
    display: block;
}

/* Dashboard - Enhanced with Voice Theme */
.dashboard-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 50px 0;
    position: relative;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.03) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--voxydocs-primary) 0%, var(--voxydocs-primary-light) 100%);
    color: white;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
    }
}

.dashboard-header h2 {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--voxydocs-primary) 0%, var(--voxydocs-primary-light) 50%, var(--voxydocs-accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-light);
    font-size: 20px;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.feature-pills {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.pill {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--voxydocs-primary);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.pill:hover {
    border-color: var(--voxydocs-primary);
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Tool Categories - Enhanced */
.category-section {
    margin-bottom: 60px;
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.category-section:nth-child(1) { animation-delay: 0.1s; }
.category-section:nth-child(2) { animation-delay: 0.2s; }
.category-section:nth-child(3) { animation-delay: 0.3s; }
.category-section:nth-child(4) { animation-delay: 0.4s; }
.category-section:nth-child(5) { animation-delay: 0.5s; }

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

.category-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--voxydocs-black);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--voxydocs-primary);
    position: relative;
    display: inline-block;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--voxydocs-accent-blue);
    border-radius: 2px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--card-bg);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--voxydocs-primary), var(--voxydocs-accent-blue), var(--voxydocs-accent-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

.tool-card:hover {
    border-color: var(--voxydocs-primary);
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.tool-icon {
    font-size: 56px;
    margin-bottom: 16px;
    display: inline-block;
    transition: var(--transition);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 8px 16px rgba(30, 64, 175, 0.2));
}

.tool-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--voxydocs-primary);
    margin-bottom: 10px;
    transition: var(--transition);
}

.tool-card:hover h4 {
    color: var(--voxydocs-primary-dark);
}

.tool-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Tool Form - Enhanced */
.tool-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.back-btn {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    border-color: var(--voxydocs-primary);
    color: var(--voxydocs-primary);
    background: rgba(30, 64, 175, 0.05);
    transform: translateX(-4px);
}

.back-btn:active {
    transform: translateX(-2px);
}

#tool-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--voxydocs-primary) 0%, var(--voxydocs-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
}

.tool-form-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.placeholder {
    text-align: center;
    color: var(--text-lighter);
    padding: 80px 20px;
    font-size: 18px;
    font-weight: 500;
}

/* Form Styles - Enhanced */
.form-group {
    margin-bottom: 28px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
    letter-spacing: 0.3px;
}

.form-group label::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--voxydocs-primary);
    border-radius: 50%;
    margin-left: 6px;
    opacity: 0;
    transition: var(--transition);
}

.form-group:focus-within label::after {
    opacity: 1;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--voxydocs-primary);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--voxydocs-primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.7;
}

.form-group input[type="file"] {
    padding: 12px;
    cursor: pointer;
}

.form-group input[type="file"]::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    border: 2px solid var(--voxydocs-primary);
    border-radius: var(--radius-sm);
    background: var(--voxydocs-primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.form-group input[type="file"]::file-selector-button:hover {
    background: var(--voxydocs-primary-dark);
    transform: translateY(-1px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checkbox-label:hover {
    background: rgba(30, 64, 175, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--voxydocs-primary);
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"]:checked {
    transform: scale(1.1);
}

.checkbox-label span {
    font-weight: 500;
    color: var(--text);
    user-select: none;
}

/* Buttons - Enhanced */
.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--voxydocs-primary) 0%, var(--voxydocs-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

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

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--voxydocs-primary);
    border: 2px solid var(--voxydocs-primary);
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--voxydocs-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-light);
    flex-wrap: wrap;
}

/* Modal - Enhanced */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 2px solid var(--border-light);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.modal-header h3 {
    color: var(--voxydocs-primary);
    font-size: 26px;
    font-weight: 800;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--text);
    background: var(--bg);
    transform: rotate(90deg);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: var(--card-bg);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg);
}

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

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--voxydocs-primary);
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 24px 32px;
    border-top: 2px solid var(--border-light);
    justify-content: flex-end;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    flex-wrap: wrap;
}

/* Loading - Enhanced */
.loading {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--voxydocs-primary);
    margin-top: 24px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(30, 64, 175, 0.2);
    border-top-color: var(--voxydocs-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Messages - Enhanced */
.message {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-top: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInMessage 0.3s ease-out;
    box-shadow: var(--shadow);
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message.error {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: var(--voxydocs-accent-red);
    border-left: 4px solid var(--voxydocs-accent-red);
}

.message.success {
    background: linear-gradient(135deg, #efe 0%, #dfd 100%);
    color: var(--voxydocs-accent-green);
    border-left: 4px solid var(--voxydocs-accent-green);
}

.message::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.message.error::before {
    background: var(--voxydocs-accent-red);
}

.message.success::before {
    background: var(--voxydocs-accent-green);
}

/* Preview Content Styling */
#preview-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
}

#preview-content h1,
#preview-content h2,
#preview-content h3 {
    margin-top: 24px;
    margin-bottom: 16px;
}

#preview-content p {
    margin-bottom: 16px;
}

#preview-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

#preview-content table th,
#preview-content table td {
    padding: 12px;
    border: 1px solid var(--border);
    text-align: left;
}

#preview-content table th {
    background: var(--voxydocs-primary);
    color: white;
    font-weight: 600;
}

/* Responsive - Enhanced */
@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .tool-form-container {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        padding: 16px 20px;
    }

    .main-content {
        padding: 24px 20px;
    }

    .dashboard-header h2 {
        font-size: 32px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .tool-form-container {
        padding: 24px;
    }

    .modal-content {
        max-height: 95vh;
        margin: 10px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn-primary,
    .action-buttons .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 24px;
    }

    .dashboard-header h2 {
        font-size: 28px;
    }

    .category-title {
        font-size: 24px;
    }

    #tool-title {
        font-size: 24px;
    }

    .tool-card {
        padding: 24px 16px;
    }

    .tool-icon {
        font-size: 48px;
    }
}

/* Print Styles */
@media print {
    .app-header,
    .tool-header,
    .action-buttons,
    .modal-footer {
        display: none;
    }

    .modal-content {
        box-shadow: none;
        border: none;
    }
}

/* Accessibility */
*:focus-visible {
    outline: 3px solid var(--voxydocs-primary);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--voxydocs-primary);
    color: white;
}

::-moz-selection {
    background: var(--voxydocs-primary);
    color: white;
}
