:root {
    --primary: #c2002f; /* PolyU Red-ish */
    --primary-dark: #960024;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
}

header {
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: fadeInUp 0.8s ease;
}

.hidden {
    display: none !important;
}

h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.instruction {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.file-drop-area {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 40px 20px;
    margin-bottom: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-drop-area:hover, .file-drop-area.dragover {
    border-color: var(--primary);
    background: rgba(194, 0, 47, 0.1);
}

.file-msg {
    color: var(--text-muted);
    pointer-events: none;
}

input[type=file] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.primary-btn:hover {
    background: var(--primary-dark);
}

.url-box {
    display: flex;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 5px;
    margin: 25px 0;
    border: 1px solid var(--border);
}

#feed-url {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 10px 15px;
    font-size: 0.9rem;
    outline: none;
}

#copy-btn {
    background: var(--border);
    border: none;
    color: white;
    width: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#copy-btn:hover {
    background: rgba(255,255,255,0.2);
}

.secondary-btn {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.secondary-btn:hover {
    background: rgba(255,255,255,0.1);
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px auto;
}

.error {
    color: #ef4444;
    margin-top: 15px;
    font-size: 0.9rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

footer {
    margin-top: 50px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
