:root {
    --bg-color: #0f0f13;
    --text-color: #ffffff;
    --glass-bg: rgba(30, 30, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #f50514;
    /* OnePlus Red-ish */
    --accent-hover: #d40412;
    --secondary-text: #a0a0a0;
    --input-bg: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    /* Fallback */
    min-height: 100dvh;
    /* Dynamic viewport height for mobile browsers */
    display: grid;
    place-items: center;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    overscroll-behavior: none;
    /* Prevent elastic bounce on mobile */
}

/* Background Effects */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.background-glob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 5, 20, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -200px;
    left: -200px;
}

.glob-2 {
    top: auto;
    left: auto;
    bottom: -200px;
    right: -200px;
    background: radial-gradient(circle, rgba(20, 100, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
}

.glass-container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

header h1 {
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: 1px;
}

header h1 span {
    font-weight: 600;
    color: var(--accent-color);
}

header p {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.control-group {
    margin-bottom: 1.5rem;
    transition: opacity 0.3s;
}

.control-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--secondary-text);
}

select {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    appearance: none;
    /* Custom arrow ideally */
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.primary-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.primary-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.primary-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

/* Result Card */
.result-card {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border-top: 1px solid var(--glass-border);
}

.result-card.hidden {
    display: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-header h2 {
    font-size: 1.2rem;
}

.badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.detail-item {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.detail-item .label {
    display: block;
    color: var(--secondary-text);
    font-size: 0.8rem;
}

.detail-item .value {
    display: block;
    margin-top: 2px;
    word-break: break-all;
}

.detail-item .value.md5 {
    font-family: monospace;
    opacity: 0.8;
}

.download-btn {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    padding: 12px;
    background: white;
    color: black;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: 0.2s;
}

.download-btn:hover {
    background: #e0e0e0;
}

#no-update-msg {
    text-align: center;
    color: var(--secondary-text);
    padding: 1rem;
}

.hidden {
    display: none !important;
}

/* Copy Link Styles */
.url-copy-container {
    display: flex;
    gap: 8px;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.url-copy-container input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px;
    color: var(--secondary-text);
    font-family: monospace;
    font-size: 0.85rem;
}

.url-copy-container input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.icon-btn.copied {
    background: #4caf50;
    /* Green for success */
    color: white;
}

/* Cursor Glow */
/* Cursor Glow */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle 600px at var(--x, 50%) var(--y, 50%), rgba(245, 5, 20, 0.15) 0%, transparent 50%);
    opacity: 0;
    /* Hidden until moved */
    transition: opacity 0.5s ease;
    mix-blend-mode: screen;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .glass-container {
        width: min(85%, 400px);
        /* Tighter width for more side margin */
        margin: 0;
        /* Grid centers it */
        padding: 1.5rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .cursor-glow {
        display: block;
        /* Re-enable for mobile touch tracking */
    }
}