:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --accent: #27ae60;
    --bg: #f4f6f8;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-muted: #7f8c8d;
    --border: #dce1e6;
    --error: #e74c3c;
    --success: #27ae60;
}

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

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

header {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.4rem;
    font-weight: 600;
}

.header-logo {
    height: 28px;
    filter: brightness(0) invert(1);
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.upload-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 520px;
}

/* PIN Section */
#pin-section {
    text-align: center;
}

#pin-section label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

#pin-input {
    width: 200px;
    padding: 0.75rem 1rem;
    font-size: 1.2rem;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    outline: none;
    letter-spacing: 4px;
    transition: border-color 0.2s;
}

#pin-input:focus {
    border-color: var(--primary-light);
}

#pin-submit {
    display: block;
    margin: 1.2rem auto 0;
    padding: 0.7rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

#pin-submit:hover {
    background: var(--primary-light);
}

/* Drop Zone */
#drop-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

#drop-zone:hover,
#drop-zone.dragover {
    border-color: var(--primary-light);
    background: rgba(41, 128, 185, 0.04);
}

#drop-zone.dragover {
    transform: scale(1.01);
}

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

.drop-zone-content p {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

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

#file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Progress */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-light);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s;
}

#progress-text {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Result */
.result-card {
    text-align: center;
    margin-top: 1rem;
}

.result-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.result-card.success h3 {
    color: var(--success);
}

.result-card.error h3 {
    color: var(--error);
}

.file-name {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.link-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.link-box input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text);
    background: var(--bg);
    outline: none;
}

#copy-btn {
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

#copy-btn:hover {
    background: #219a52;
}

.warning {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

#upload-another,
#retry-btn {
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

#upload-another:hover,
#retry-btn:hover {
    background: var(--primary-light);
}

#error-message {
    color: var(--error);
    margin-bottom: 1rem;
}

/* Error Card */
.error-card {
    text-align: center;
    padding: 2rem;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .upload-card {
        padding: 1.5rem;
    }

    #drop-zone {
        padding: 2rem 1rem;
    }

    .link-box {
        flex-direction: column;
    }
}
