/* SecureDrop Styles */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3b82f6;
        --primary-hover: #2563eb;
        --text-color: #f9fafb;
        --text-muted: #9ca3af;
        --bg-color: #111827;
        --bg-secondary: #1f2937;
        --border-color: #374151;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    flex: 1;
    max-width: 800px;
    margin: -2rem auto 2rem;
    padding: 0 1rem;
    width: 100%;
}

.card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.card p {
    margin-bottom: 1rem;
}

.card ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.card ul li {
    margin-bottom: 0.5rem;
}

h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.drop-zone svg {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.drop-zone p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.drop-zone .text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* File Info */
.file-info {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.file-info p {
    margin-bottom: 0.5rem;
}

/* TTL Selector */
.ttl-selector {
    margin-bottom: 1.5rem;
}

.ttl-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin-right: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-decoration: none;
    text-align: center;
}

.btn-auto {
    width: auto;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Progress Bar */
#progress-section {
    margin-top: 1.5rem;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
    width: 0%;
}

/* Result Section */
.result-section {
    margin-top: 1.5rem;
}

.url-box {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.url-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: monospace;
    background: var(--bg-secondary);
    color: var(--text-color);
}

.url-box .btn {
    width: auto;
    white-space: nowrap;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.warning-box strong {
    color: var(--warning-color);
}

.warning-box ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

/* Info Section */
.info-section {
    text-align: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature {
    text-align: center;
}

.feature h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

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

footer a:hover {
    text-decoration: underline;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 1.5rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .features {
        grid-template-columns: 1fr;
    }
}
