:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #f83600;
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Gradient */
.background-anim {
    position: fixed;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(79,172,254,0.15) 0%, rgba(15,23,42,1) 50%);
    animation: rotateBg 15s linear infinite;
    z-index: -1;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
}

header h1 span {
    color: var(--primary);
}

header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Input Styles */
.input-group {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.icon-input {
    padding: 1rem 1.5rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
}

.input-group button {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    border-radius: 40px;
    padding: 0 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.input-group button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
}

.hidden {
    display: none !important;
}

/* Status Message */
#statusMessage {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.msg-error {
    background: rgba(248, 54, 0, 0.2);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
}

.msg-success {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
    border: 1px solid #2ed573;
}

/* Loader */
.loader-container {
    text-align: center;
    margin: 3rem 0;
}

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

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Results Area */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.badge {
    background: var(--primary);
    color: var(--bg-dark);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* File Card */
.file-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: rgba(0, 242, 254, 0.3);
}

.file-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    text-align: center;
}

.file-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-download {
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-download:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-stream {
    background: rgba(46, 213, 115, 0.1);
    color: #2ed573;
    border: 1px solid #2ed573;
}

.btn-stream:hover {
    background: #2ed573;
    color: var(--bg-dark);
}

/* Responsive */
@media (max-width: 600px) {
    header h1 { font-size: 2.2rem; }
    .input-group { flex-direction: column; border-radius: 15px; padding: 1rem;}
    .input-group input { padding: 0.5rem 0; text-align: center;}
    .input-group button { padding: 1rem; border-radius: 10px; margin-top: 0.5rem;}
    .icon-input { display: none; }
}