
:root {
    --blue-1: #ebf4ff; 
    --blue-2: #d1e9ff; 
    --blue-3: #e0e7ff; 
    --blue-4: #f0f9ff; 
    --glass-bg: rgba(255, 255, 255, 0.22); 
    --glass-border: rgba(255, 255, 255, 0.45);
    --item-bg: rgba(255, 255, 255, 0.3);
    --item-hover: rgba(255, 255, 255, 0.7);
    --text-main: #2c3e50;
    --text-sub: #4a6fa5;
    --cute-blue: #70a1ff;
    --cute-blue-light: #a8c9ff;
    --ease-expo: cubic-bezier(0.16, 1, 0.3, 1); 
    --danger-color: #e74c3c;
}

* { box-sizing: border-box; }

html, body { 
    height: auto; 
    min-height: 100%; 
    margin: 0; 
    padding: 0; 
    overflow-x: hidden;
    overflow-y: auto; 
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "PingFang SC", "Quicksand", "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(-45deg, var(--blue-1), var(--blue-2), var(--blue-3), var(--blue-4));
    background-size: 400% 400%;
    animation: blueFlow 20s ease-in-out infinite;
    padding: 5vh 2vw; 
    color: var(--text-main);
}

@keyframes blueFlow { 
    0% { background-position: 0% 50%; } 
    50% { background-position: 100% 50%; } 
    100% { background-position: 0% 50%; } 
}

/* --- General Glass Block Style -- */
.glass-block {
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 40px;
    margin-bottom: 30px;
    transition: all 0.6s var(--ease-expo);
    animation: entrance 1s var(--ease-expo) backwards;
}

.glass-block:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.35); 
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

@keyframes entrance { 
    0% { opacity: 0; transform: translateY(30px) scale(0.99); } 
    100% { opacity: 1; transform: translateY(0) scale(1); } 
}

/* --- Containers & Layout --- */
.container { width: 100%; max-width: 900px; z-index: 1; }
header { display: flex; justify-content: space-between; align-items: center; padding: 20px; margin-bottom: 20px; }
h1 { margin: 0; font-size: 2.5rem; font-weight: 900; background: linear-gradient(180deg, #5c85d6 0%, var(--cute-blue) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(2px 2px 10px rgba(168, 201, 255, 0.5)); }
h2 { color: var(--cute-blue); margin-top: 0; margin-bottom: 25px; text-align: center; font-weight: 700; }

/* --- Buttons --- */
button, .button-like { padding: 14px 25px; border: none; border-radius: 20px; background: var(--item-bg); border: 1px solid var(--glass-border); color: var(--text-sub); font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.5s var(--ease-expo); display: inline-block; text-align: center; }
button:hover, .button-like:hover { transform: scale(1.05); background: var(--item-hover); box-shadow: 0 10px 20px rgba(112, 161, 255, 0.25); color: var(--cute-blue); }
button:active, .button-like:active { transform: scale(0.98); }
button.danger { background-color: #ffdde0; color: var(--danger-color); }
button.danger:hover { background: #ffc9ce; box-shadow: 0 10px 20px rgba(231, 76, 60, 0.25); }

/* --- Inputs & Selects --- */
input[type="text"], input[type="password"], select { width: 100%; padding: 15px 20px; border: 1px solid var(--glass-border); border-radius: 20px; background: rgba(255, 255, 255, 0.5); font-size: 1rem; color: var(--text-main); outline: none; transition: all 0.5s var(--ease-expo); }
input[type="text"]:focus, input[type="password"]:focus, select:focus { transform: scale(1.02); box-shadow: 0 0 0 3px var(--cute-blue-light); border-color: var(--cute-blue); }

/* --- Auth Section --- */
.auth-container { display: flex; gap: 15px; align-items: center; }
#user-info span { font-weight: 600; color: var(--text-sub); }

/* --- Modal Styles (Shared) --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.4); backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 1000; animation: fadeIn 0.5s var(--ease-expo); }
.modal-content { width: 90%; max-width: 450px; position: relative; }
.close-button { position: absolute; top: 10px; right: 15px; font-size: 2rem; background: none; box-shadow: none; border: none; color: var(--text-sub); cursor: pointer; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Auth Modal Tabs (FIX)--- */
#auth-tabs { display: flex; gap: 10px; border-bottom: none; margin-bottom: 25px; }
.tab-link { flex-grow: 1; text-align: center; padding: 10px 0; border-radius: 20px !important; /* Force override */ box-shadow: none; border: 1px solid transparent; font-size: 1.1rem; }
.tab-link.active { background: var(--item-hover); color: var(--cute-blue); font-weight: 700; border-color: var(--glass-border); box-shadow: 0 5px 15px rgba(112, 161, 255, 0.15); }
.auth-form { display: flex; flex-direction: column; gap: 20px; }

/* --- Generic Alert/Confirm Modal Styles (NEW) --- */
#alert-modal .modal-content { max-width: 400px; text-align: center; }
#alert-modal p { color: var(--text-sub); line-height: 1.6; margin: 20px 0 30px 0; font-size: 1.1rem;}
.alert-buttons { display: flex; justify-content: center; gap: 15px; }

/* --- Other Sections --- */
.url-input-card { display: flex; gap: 15px; align-items: center; }
.url-input-card input { flex-grow: 1; }
#uploader-section .controls { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.file-upload-wrapper { display: flex; align-items: center; gap: 15px; flex-grow: 1; }
.file-upload-wrapper input[type="file"] { display: none; }
.file-name { font-style: italic; color: #8a92a5; }
.cookie-status { margin-top: 15px; font-weight: 500; text-align: center; }
.cookie-status.has-cookie { color: #27ae60; }
.cookie-status.no-cookie { color: var(--danger-color); }
#video-info-container img { max-width: 100%; border-radius: 25px; margin-bottom: 20px; box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
#video-info-container .format-selection { display: flex; gap: 20px; margin: 20px 0; }
#video-info-container .format-selection > div { flex: 1; }
#history-list { list-style: none; padding: 0; }
#history-list li { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-radius: 20px; margin-bottom: 15px; background: var(--item-bg); transition: all 0.4s var(--ease-expo); }
#history-list li:hover { transform: scale(1.03); background: var(--item-hover); box-shadow: 0 10px 20px rgba(112, 161, 255, 0.15); }
#history-list li a { color: var(--text-sub); text-decoration: none; font-weight: 500; }
#history-list li a:hover { color: var(--cute-blue); }
.progress-bar-wrapper { width: 100%; height: 25px; background: rgba(255, 255, 255, 0.5); border-radius: 25px; border: 1px solid var(--glass-border); overflow: hidden; margin: 20px 0; }
.progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--cute-blue-light), var(--cute-blue)); border-radius: 25px; transition: width 0.5s ease; }
.progress-text, .progress-details { text-align: center; font-weight: 500; margin-top: 10px; }
.progress-details a { color: var(--cute-blue); font-weight: 700; }
footer { text-align: center; margin-top: 40px; color: var(--text-sub); }
footer a { color: var(--cute-blue); text-decoration: none; }
