/* Custom styles for AI Content Generator */

:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --dark-bg: #1F2937;
    --dark-text: #F9FAFB;
}

/* PWA Styles */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* Loading animation */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
    background: #6B7280;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Quill editor customization */
.ql-toolbar.ql-snow {
    border-radius: 8px 8px 0 0;
    background-color: #F9FAFB;
    border-color: #E5E7EB;
}

.dark .ql-toolbar.ql-snow {
    background-color: #374151;
    border-color: #4B5563;
}

.dark .ql-toolbar.ql-snow .ql-stroke {
    stroke: #D1D5DB;
}

.dark .ql-toolbar.ql-snow .ql-fill,
.dark .ql-toolbar.ql-snow .ql-stroke.ql-fill {
    fill: #D1D5DB;
}

.dark .ql-toolbar.ql-snow button:hover .ql-stroke,
.dark .ql-toolbar.ql-snow button.ql-active .ql-stroke {
    stroke: #3B82F6;
}

.dark .ql-toolbar.ql-snow button:hover .ql-fill,
.dark .ql-toolbar.ql-snow button.ql-active .ql-fill {
    fill: #3B82F6;
}

.ql-container.ql-snow {
    border-radius: 0 0 8px 8px;
    border-color: #E5E7EB;
    background-color: white;
}

.dark .ql-container.ql-snow {
    background-color: #1F2937;
    border-color: #4B5563;
    color: #F9FAFB;
}

.dark .ql-editor {
    color: #F9FAFB;
}

.dark .ql-editor.ql-blank::before {
    color: #9CA3AF;
}

/* Sidebar active state */
.sidebar-item-active {
    background-color: #EFF6FF;
    border-left: 3px solid #3B82F6;
}

.dark .sidebar-item-active {
    background-color: #1E3A8A;
    border-left: 3px solid #60A5FA;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Button animations */
button {
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.98);
}

/* File upload area */
input[type="file"] {
    padding: 8px;
}

input[type="file"]:hover {
    background-color: #F3F4F6;
}

.dark input[type="file"]:hover {
    background-color: #4B5563;
}

/* Audio player customization */
audio {
    width: 100%;
    height: 40px;
    border-radius: 8px;
}

audio::-webkit-media-controls-panel {
    background-color: #F3F4F6;
}

.dark audio::-webkit-media-controls-panel {
    background-color: #374151;
}

/* Table styles */
table {
    border-collapse: separate;
    border-spacing: 0;
}

table thead th:first-child {
    border-top-left-radius: 8px;
}

table thead th:last-child {
    border-top-right-radius: 8px;
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(5px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    aside {
        position: fixed;
        left: -100%;
        z-index: 40;
        transition: left 0.3s ease;
    }
    
    aside.mobile-open {
        left: 0;
    }
    
    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 30;
    }
}

/* Print styles */
@media print {
    aside,
    nav,
    .no-print {
        display: none !important;
    }
    
    .content-section {
        padding: 0 !important;
    }
}

/* PWA install prompt styles */
.install-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
    animation: slideUp 0.5s ease;
}

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

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Loading skeleton */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% {
        background-color: #E5E7EB;
    }
    100% {
        background-color: #F3F4F6;
    }
}

.dark .skeleton {
    animation: skeleton-loading-dark 1s linear infinite alternate;
}

@keyframes skeleton-loading-dark {
    0% {
        background-color: #374151;
    }
    100% {
        background-color: #4B5563;
    }
}
