/*!
 * Vortex Proxy - Style Sheet
 * Theme: Dark vortex theme with neon purple accents
 * Author: Vortex Hub Services
 */

:root {
    --bg-color: #0a0a1a;
    --primary-color: #7c3aed;
    --secondary-color: #3b82f6;
    --accent-color: #ec4899;
    --text-color: #e0e0ff;
    --text-secondary: #8888aa;
    --footer-color: #444466;
    --transition-speed: 0.3s;
    --bar-height: 90px;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes nebula {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.3; }
    33%  { transform: translate(30px, -20px) scale(1.1); opacity: 0.4; }
    66%  { transform: translate(-20px, 30px) scale(0.9); opacity: 0.2; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes progress-slide {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   BODY
   ========================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* ==========================================
   BACKGROUND EFFECTS
   ========================================== */
#stars-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.nebula {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}
.nebula-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent);
    top: -100px; right: -100px;
    animation: nebula 15s ease-in-out infinite;
}
.nebula-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent);
    bottom: -50px; left: -100px;
    animation: nebula 20s ease-in-out infinite reverse;
}
.nebula-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08), transparent);
    top: 50%; left: 50%;
    animation: nebula 18s ease-in-out infinite 5s;
}

/* ==========================================
   HEADER (Fixed)
   ========================================== */
.vortex-header {
    width: 100%;
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    background: rgba(10, 10, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
}

.nav-logo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(236, 72, 153, 0.2));
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.1);
}
.nav-logo-btn:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(236, 72, 153, 0.35));
    border-color: #7c3aed;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
    transform: translateY(-1px);
}

.status-seguro {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==========================================
   MAIN CONTENT (Centralizada)
   ========================================== */
.vortex-main {
    margin-top: 80px;
    margin-bottom: 80px;
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    width: 100%;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: float 4s ease-in-out infinite;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* ==========================================
   PROXY FORM (Card)
   ========================================== */
.proxy-form {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    max-width: 600px;
    width: 100%;
    text-align: left;
    margin: 0 auto 2rem;
}
.proxy-form h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all var(--transition-speed);
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}
.form-group input::placeholder { color: #555; }
.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

.btn-proxy {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-speed);
    margin-top: 1rem;
}
.btn-proxy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}
.btn-proxy:active { transform: translateY(0); }

/* ==========================================
   FOOTER (Fixed)
   ========================================== */
.vortex-footer {
    width: 100%;
    position: fixed;
    bottom: 0; left: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-text {
    font-size: 0.8rem;
    color: var(--footer-color);
    letter-spacing: 2px;
}
.footer-links a {
    margin-left: 15px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: color var(--transition-speed);
}
.footer-links a:hover { color: var(--primary-color); }

/* ==========================================
   BROWSE STATE: BAR
   ========================================== */
.browse-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 10px 16px;
    background: rgba(10, 10, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.browse-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.browse-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.browse-back {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all var(--transition-speed);
}
.browse-back:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.browse-url-row {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    min-height: 40px;
}

.browse-lock {
    font-size: 0.75rem;
    color: #22c55e;
    flex-shrink: 0;
}

.browse-url-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-size: 0.92rem;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    min-width: 0;
}
.browse-url-row input::placeholder {
    color: #555;
}

.browse-go {
    flex-shrink: 0;
    padding: 7px 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-speed);
}
.browse-go:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}
.browse-go:active { transform: translateY(0); }

.browse-shortcuts {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.proxy-shortcut {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    transition: all var(--transition-speed);
}
.proxy-shortcut:hover {
    color: var(--primary-color);
    border-color: rgba(124, 58, 237, 0.4);
    background: rgba(124, 58, 237, 0.1);
}

/* ==========================================
   BROWSE STATE: PROGRESS BAR
   ========================================== */
.browse-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 1001;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: progress-slide 1.5s ease infinite;
}

/* ==========================================
   BROWSE STATE: LOADING OVERLAY
   ========================================== */
.browse-loading {
    position: fixed;
    top: var(--bar-height);
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(10, 10, 26, 0.85);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(124, 58, 237, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ==========================================
   BROWSE STATE: IFRAME
   ========================================== */
#proxyFrame {
    position: fixed;
    top: var(--bar-height);
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: calc(100vh - var(--bar-height));
    border: none;
    background: #fff;
    z-index: 998;
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */
@media (max-width: 600px) {
    .top-nav { padding: 10px; }
    .vortex-footer { flex-direction: column; gap: 10px; padding: 10px; }
    .footer-links { margin-top: 5px; text-align: center; }
    .footer-links a { margin: 0 5px; }

    .browse-bar { padding: 8px 10px; }
    .browse-top-row { flex-direction: column; align-items: stretch; gap: 6px; }
    .browse-back { text-align: center; justify-content: center; }
    .browse-shortcuts { justify-content: center; }
}
