@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

:root {
    --accent: #ff5722;
    --accent-glow: rgba(255, 87, 34, 0.5);
    --neon-ring: #00f2ff;
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-glass-dark: rgba(0, 0, 0, 0.3);
    --border-glass: rgba(255, 255, 255, 0.2);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #000;
    color: var(--text-main);
    overflow: hidden;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
}

/* Layout */
.app-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.main-card {
    width: 100%;
    max-width: 480px;
    padding: 40px;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

/* Header Section */
.hero-text {
    margin-bottom: 40px;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.1;
}

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

/* Start Button & Animations */
.start-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.btn-start {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-start .label {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 600;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-start .icon {
    position: absolute;
    font-size: 2rem;
    color: var(--accent);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.btn-start:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.btn-start:hover .label {
    opacity: 0;
    transform: translateY(-10px);
}

.btn-start:hover .icon {
    opacity: 1;
    transform: translateY(0);
}

/* Pulse Animation */
@keyframes pulse-out {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    pointer-events: none;
    animation: pulse-out 2s infinite;
}

/* Neon Racing Ring */
@keyframes rotate-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.neon-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    margin-top: -90px;
    margin-left: -90px;
    border-radius: 50%;
    pointer-events: none;
}

.neon-ring::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 70%, var(--neon-ring) 100%);
    animation: rotate-ring 1s linear infinite;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff 100%);
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff 100%);
}

/* File List */
.file-list-container {
    text-align: left;
    margin-top: 20px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.file-list-container::-webkit-scrollbar {
    width: 4px;
}

.file-list-container::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    background: var(--bg-glass-dark);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.file-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-remove {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: rgba(255, 68, 68, 0.1);
}

/* Forms */
.form-section {
    margin-top: 24px;
    text-align: left;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 14px;
    background: var(--bg-glass-dark);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
    background: #e64a19;
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Dropzone Overlay */
#drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 87, 34, 0.9);
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

#drop-overlay .content {
    text-align: center;
    color: #fff;
}

#drop-overlay .icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

#drop-overlay h2 {
    font-size: 3rem;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 140px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -70px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Progress Ring */
.progress-ring-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
}

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

.progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
    stroke: var(--accent);
    stroke-linecap: round;
}

.progress-ring__background {
    stroke: rgba(255, 255, 255, 0.1);
}

/* Success Card */
.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    z-index: 2000;
    transition: none;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
}

#sidebar.open {
    right: 0;
}

#sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
    backdrop-filter: blur(4px);
}

#btn-history-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 10px 20px;
    border-radius: 99px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.history-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.history-item h4 {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.history-item .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
}

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

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .main-card {
        padding: 30px 20px;
        border-radius: 0;
        height: 100vh;
        max-width: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    #sidebar {
        width: 100%;
        right: -100%;
    }
    
    .app-container {
        height: auto;
        min-height: 100vh;
    }
}
