:root {
    --bg-dark: #07090e;
    --card-bg: rgba(18, 24, 38, 0.75);
    --border-color: rgba(255, 255, 255, 0.12);
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --accent: #9333EA;
    --accent-cyan: #06B6D4;
    --success: #10B981;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 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;
    padding: 20px;
}

/* Background Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.45;
    animation: floatBlob 18s ease-in-out infinite alternate;
}

.blob-1 {
    top: -10%;
    left: 10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #6366F1, #9333EA);
}

.blob-2 {
    bottom: -15%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #06B6D4, #3B82F6);
    animation-delay: -9s;
}

.blob-3 {
    top: 40%;
    left: 60%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #EC4899, #8B5CF6);
    animation-delay: -4s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 60px) scale(1.1); }
}

/* App Container */
.app-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 540px;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 25px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-accent {
    color: var(--accent-cyan);
}

.tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 6px;
}

/* Main Card */
.main-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(99, 102, 241, 0.15);
}

/* View Sections */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dropzone */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.06);
    transform: translateY(-2px);
}

.icon-circle {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(147, 51, 234, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-cyan);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropzone h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.sub-text {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-accent {
    background: linear-gradient(135deg, #06B6D4, #3B82F6);
    color: #fff;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-accent:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.full-width {
    width: 100%;
    margin-top: 15px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
}

/* Selected File & Info Box */
.file-selected-area {
    margin-top: 20px;
}

.file-info-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.file-info-badge i {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

.file-info-badge span {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}

.info-box {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: #E2E8F0;
    line-height: 1.5;
}

.info-box i {
    color: var(--accent-cyan);
    margin-right: 6px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-icon:hover {
    color: #EF4444;
}

/* Tip Card (Instagram Sharing Guide) */
.tip-card {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.12), rgba(131, 58, 180, 0.12));
    border: 1px solid rgba(225, 48, 108, 0.3);
    border-radius: 14px;
    padding: 16px 20px;
    margin: 20px 0;
    text-align: left;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.tip-icon {
    font-size: 1.3rem;
    color: #E1306C;
}

.tip-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #F472B6;
}

.tip-card p {
    font-size: 0.88rem;
    color: #CBD5E1;
    line-height: 1.5;
}

/* Spinner & Progress */
.loader-container {
    text-align: center;
    padding: 30px 0;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-cyan);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent));
    transition: width 0.3s ease;
}

/* Success Box */
.success-box {
    text-align: center;
}

.success-icon {
    width: 75px;
    height: 75px;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--success);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 20px;
}

.download-trigger-box {
    margin: 25px 0;
}

.auto-dl-text {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-top: 10px;
}

/* Cleanup Timer Card */
.cleanup-timer-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 25px;
    text-align: left;
}

.timer-ring {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.timer-ring svg {
    transform: rotate(-90deg);
}

.timer-ring circle {
    fill: none;
    stroke-width: 4;
}

.timer-ring circle.bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.timer-ring circle.progress {
    stroke: #EF4444;
    stroke-dasharray: 151;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-ring span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    font-weight: 700;
    color: #F8FAFC;
}

.timer-info h4 {
    font-size: 0.95rem;
    color: #FCA5A5;
    margin-bottom: 4px;
}

.timer-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Footer */
.app-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
