:root {
    /* Light Theme Variables */
    --bg-color: #f5f5f5;
    --surface-color: #ffffff;
    --primary-color: #6200ee;
    --primary-variant: #3700b3;
    --secondary-color: #03dac6;
    --text-primary: #000000;
    --text-secondary: #666666;
    --error-color: #b00020;
    --border-color: #e0e0e0;
    --shadow-1: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);
    --shadow-2: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #bb86fc;
    --primary-variant: #3700b3;
    --secondary-color: #03dac6;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --error-color: #cf6679;
    --border-color: #333333;
    --shadow-1: 0 2px 1px -1px rgba(0, 0, 0, 0.4), 0 1px 1px 0 rgba(0, 0, 0, 0.28), 0 1px 3px 0 rgba(0, 0, 0, 0.24);
    --shadow-2: 0 3px 1px -2px rgba(0, 0, 0, 0.4), 0 2px 2px 0 rgba(0, 0, 0, 0.28), 0 1px 5px 0 rgba(0, 0, 0, 0.24);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 32px;
    color: var(--primary-color);
}

h1 {
    margin: 0;
    font-weight: 500;
    font-size: 24px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cards */
.card {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.card-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

.login-card {
    max-width: 400px;
    margin: 40px auto;
}

/* Forms & Inputs */
.input-group {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 5px 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.input-group:focus-within {
    border-color: var(--primary-color);
}

.input-group .material-icons {
    color: var(--text-secondary);
    margin-right: 10px;
}

input[type="text"],
input[type="password"] {
    background: none;
    border: none;
    color: var(--text-primary);
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    outline: none;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
}

/* Buttons */
button {
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    border: none;
    outline: none;
    transition: background-color 0.2s;
}

.primary-btn {
    background-color: var(--primary-color);
    color: #000000;
    /* Dark text on primary usually looks better in dark mode */
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

[data-theme="light"] .primary-btn {
    color: #ffffff;
}

.primary-btn:hover {
    opacity: 0.9;
}

.icon-btn {
    background: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.text-btn {
    background: none;
    color: var(--primary-color);
    font-weight: 500;
    text-transform: uppercase;
    padding: 8px 16px;
}

.text-btn:hover {
    background-color: rgba(var(--primary-color), 0.1);
}

.delete-btn {
    color: var(--error-color);
}

.delete-btn:hover {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff5252;
}

/* Lists */
ul.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

li:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.file-icon {
    color: var(--text-secondary);
}

.file-name {
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-left: 8px;
}

.actions {
    display: flex;
    gap: 5px;
}

/* Utilities */
.error {
    color: var(--error-color);
    margin-top: 10px;
    font-size: 0.9em;
}

.info-text {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 15px;
    line-height: 1.5;
}

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

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

.empty-state {
    color: var(--text-secondary);
    font-style: italic;
    justify-content: center;
    padding: 20px 0;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 16px;
    }
}

/* Footer */
.app-footer {
    margin-top: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85em;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}