/* Theme Variables */
:root {
    /* Light theme (default) */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8D8DC;
    --text-primary: #050404;
    --text-secondary: #444;
    --accent-primary: #E34C5C;
    --accent-secondary: #EEA2AC;
    --border-color: #F8D8DC;
    --disabled-color: #888;
    --shadow-color: rgba(227, 76, 92, 0.2);
    
    /* Add new emphasis variables */
    --emphasis-shadow: 0 4px 20px rgba(227, 76, 92, 0.3);
    --emphasis-border: 3px solid #E34C5C;
    --subdued-opacity: 0.4;
    --disabled-opacity: 0.2;
    --converting-bg: #888;
    --converting-text: #fff;
    --converting-shadow: 0 2px 10px rgba(136, 136, 136, 0.3);
}

/* Dark theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #FFFFFF;
    --text-secondary: #cccccc;
    --accent-primary: #E34C5C;
    --accent-secondary: #EEA2AC;
    --border-color: #444;
    --disabled-color: #666;
    --shadow-color: rgba(227, 76, 92, 0.3);
    
    /* Dark theme specific emphasis */
    --emphasis-shadow: 0 4px 25px rgba(227, 76, 92, 0.45);
    --emphasis-border: 3px solid #E34C5C;
    --subdued-opacity: 0.25;
    --disabled-opacity: 0.1;
    --converting-bg: #4a4a4a;
    --converting-text: #EEA2AC;
    --converting-shadow: 0 2px 15px rgba(238, 162, 172, 0.2);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle button {
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--emphasis-shadow);
}

.theme-toggle button:hover {
    background: var(--accent-secondary);
    transform: scale(1.1) rotate(15deg);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--bg-primary);
}

.theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

/* Update existing styles with CSS variables */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

h1 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 600;
}

p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

input, button {
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

input[type="file"] {
    display: none;
}

/* Drop Zone */
.drop-zone {
    border: var(--emphasis-border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: var(--emphasis-shadow);
}

.drop-zone:hover {
    box-shadow: var(--emphasis-shadow);
    transform: translateY(-2px);
}

.drop-zone.hover {
    border-style: solid;
    border-color: var(--accent-primary);
    box-shadow: var(--emphasis-shadow);
    transform: translateY(-2px);
    opacity: 1;
}

.drop-zone.disabled {
    border: 2px dashed var(--disabled-color);
    opacity: var(--disabled-opacity);
    cursor: not-allowed;
    box-shadow: none;
}

.drop-zone.disabled:hover {
    transform: none;
    box-shadow: none;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone .icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--accent-primary);
}

.drop-zone p {
    margin: 5px 0;
    color: var(--text-secondary);
}

/* Browse Button */
.browse-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.browse-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(227, 76, 92, 0.3);
}

/* File List */
.file-list-container {
    margin: 20px 0;
    max-height: 200px;
    overflow-y: auto;
    padding: 0 5px;
}

#fileList {
    list-style: none;
    padding: 0;
}

#fileList li {
    padding: 12px 16px;
    background: white;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(136, 136, 136, 0.1);
    color: var(--text-secondary);
    font-size: 0.95em;
    border: 1px solid var(--bg-secondary);
    border-left: 3px solid var(--accent-primary);
    transition: all 0.3s ease;
}

#fileList li:before {
    content: "📄";
    margin-right: 10px;
}

/* Convert Button Container */
.convert-container {
    position: sticky;
    bottom: 20px;
    background: linear-gradient(to top, var(--bg-primary) 80%, transparent);
    padding: 20px 0;
    text-align: center;
    z-index: 100;
}

/* Convert Button */
.convert-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--emphasis-shadow);
    margin: 0 auto;
    opacity: 1;
}

.convert-btn:not(:disabled) {
    background: var(--accent-primary);
}

.convert-btn:not(:disabled):hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: var(--emphasis-shadow);
}

.convert-btn:disabled {
    background: var(--converting-bg);
    color: var(--converting-text);
    opacity: 0.9;
    box-shadow: var(--converting-shadow);
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--converting-text);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toastify {
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--emphasis-shadow);
}

.toastify.success {
    background: var(--accent-primary) !important;
}

.toastify.error {
    background: var(--accent-secondary) !important;
    color: var(--text-primary) !important;
}

/* Rating Stars Section */
.full-stars {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--bg-secondary);
}

.full-stars .rating-group {
    display: inline-flex;
    gap: 4px;
}

.full-stars label a svg {
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
}

.full-stars label:hover a svg {
    transform: scale(1.1);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 2em;
    }

    .drop-zone {
        padding: 30px 15px;
    }

    .convert-btn {
        width: 90%;
        padding: 12px 24px;
    }
}

/* File list styling */
#fileList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-file {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.remove-file:hover {
    opacity: 1;
}

/* Drop zone states */
.drop-zone.subdued {
    border: 2px dashed var(--border-color);
    opacity: var(--subdued-opacity);
    box-shadow: none;
    background: var(--bg-secondary);
}

.drop-zone.disabled {
    border: 2px dashed var(--disabled-color);
    opacity: var(--disabled-opacity);
    cursor: not-allowed;
    box-shadow: none;
}

.drop-zone.subdued:hover {
    opacity: calc(var(--subdued-opacity) + 0.2);
    border-color: var(--accent-secondary);
    box-shadow: 0 2px 10px var(--shadow-color);
    transform: translateY(-1px);
}

.drop-zone.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* File list emphasis */
#fileList li {
    border-left: 3px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.drop-zone.subdued ~ .file-list-container #fileList li {
    border-left: 2px solid var(--border-color);
}

/* Additional visual feedback */
.drop-zone.hover {
    border-style: solid;
    border-color: var(--accent-primary);
    box-shadow: var(--emphasis-shadow);
    transform: translateY(-2px);
    opacity: 1;
}

/* Theme toggle enhancement */
.theme-toggle button:hover {
    transform: scale(1.1) rotate(15deg);
}

/* Toast notifications enhancement */
.toastify {
    box-shadow: var(--emphasis-shadow);
}

/* Add to your existing CSS */
.remove-file.disabled {
    opacity: var(--disabled-opacity);
    cursor: not-allowed;
    pointer-events: none;
}

/* Add to your existing CSS */
.full-stars.disabled {
    opacity: var(--disabled-opacity);
    pointer-events: none;
}

.full-stars a.disabled {
    pointer-events: none;
}

.full-stars.disabled label a svg {
    cursor: not-allowed;
}