/* assets/css/style.css */
/* Premium Responsive Dark Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #070913;
    --bg-surface: rgba(13, 17, 39, 0.7);
    --bg-surface-solid: #0d1127;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 242, 254, 0.2);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Sleek Harmonious Accent Gradients */
    --accent-primary: #00f2fe;
    --accent-secondary: #4facfe;
    --accent-purple: #8a2be2;
    --accent-pink: #f43f5e;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    
    --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.15);
    --shadow-purple: 0 0 20px rgba(138, 43, 226, 0.15);
}

/* Base Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(138, 43, 226, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 242, 254, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Unified Container Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navbar Navigation */
.navbar {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(7, 9, 19, 0.8);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 76px;
}
.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}
.logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    display: inline-block;
}
.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-purple));
    transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}
.btn-nav-premium {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #000;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-glow);
}
.btn-nav-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
    filter: brightness(1.1);
}

/* Glass Cards & Layout blocks */
.glass-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 8px 32px 0 rgba(0, 242, 254, 0.05);
}

/* Hero Section */
.hero {
    padding: 80px 0 40px;
    text-align: center;
}
.hero-title {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-title span {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto 32px;
}

/* Stats Counter Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.stat-card {
    background: linear-gradient(135deg, rgba(13, 17, 39, 0.8) 0%, rgba(20, 24, 53, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(138, 43, 226, 0.3);
    box-shadow: var(--shadow-purple);
}
.stat-val {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(90deg, #ffffff, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Proxy Live Table Grid & Filtering Controls */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
}
.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 260px;
}
.search-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px 12px 42px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.select-filter {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-width: 140px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.select-filter:focus {
    outline: none;
    border-color: var(--accent-primary);
}
.select-filter option {
    background-color: var(--bg-surface-solid);
    color: var(--text-primary);
}

/* Dynamic Live Table Style */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.proxy-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: rgba(13, 17, 39, 0.4);
}
.proxy-table th {
    background-color: rgba(20, 24, 53, 0.8);
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}
.proxy-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}
.proxy-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}
.proxy-table tr:last-child td {
    border-bottom: none;
}

/* Interactive elements in table */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-http { background-color: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-https { background-color: rgba(0, 242, 254, 0.1); color: var(--accent-primary); border: 1px solid rgba(0, 242, 254, 0.2); }
.badge-socks4 { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-socks5 { background-color: rgba(138, 43, 226, 0.1); color: #c084fc; border: 1px solid rgba(138, 43, 226, 0.2); }

.badge-elite { background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(138, 43, 226, 0.1)); color: #fff; border: 1px solid rgba(138, 43, 226, 0.3); }
.badge-anon { background-color: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }
.badge-transparent { background-color: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* Latency Performance Meter */
.ping-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ping-bar {
    width: 60px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}
.ping-bar-fill {
    height: 100%;
    border-radius: 3px;
}
.ping-fast { background-color: var(--success); width: 85%; }
.ping-medium { background-color: var(--warning); width: 50%; }
.ping-slow { background-color: var(--danger); width: 20%; }

.status-active {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    display: inline-block;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px var(--success); }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}
.copy-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background-color: rgba(0, 242, 254, 0.05);
}

/* Tools Layout Section */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
.tool-box {
    background: linear-gradient(135deg, rgba(13, 17, 39, 0.6) 0%, rgba(20, 24, 53, 0.6) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
    cursor: pointer;
}
.tool-box:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}
.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(138, 43, 226, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
    border: 1px solid rgba(0, 242, 254, 0.2);
}
.tool-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.tool-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.btn-tool {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tool-box:hover .btn-tool {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #000;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

/* Individual Tool Working Card */
.tool-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}
.tool-field-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.tool-input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
}
.tool-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}
.btn-action {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 100%);
    color: #fff;
    font-weight: 700;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}
.tool-results {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    display: none;
}
.result-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.result-row:last-child {
    border-bottom: none;
}
.result-label {
    color: var(--text-secondary);
    font-weight: 500;
}
.result-value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* Blog Layout Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
.blog-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-purple);
}
.blog-img-placeholder {
    height: 180px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, rgba(244, 63, 94, 0.2) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.blog-img-decor {
    position: absolute;
    bottom: 12px;
    left: 16px;
}
.blog-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-tag {
    align-self: flex-start;
    background-color: rgba(138, 43, 226, 0.1);
    color: #c084fc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}
.blog-card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.blog-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.read-more-link {
    color: var(--accent-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.read-more-link:hover {
    color: var(--accent-purple);
}

/* Detail Blog Post View */
.post-header {
    margin-bottom: 32px;
}
.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    color: #fff;
}
.post-meta {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}
.post-content {
    font-size: 1.1rem;
    color: #d1d5db;
    line-height: 1.8;
}
.post-content h2, .post-content h3 {
    color: #fff;
    margin-top: 36px;
    margin-bottom: 16px;
    font-weight: 700;
}
.post-content h2 { font-size: 1.75rem; }
.post-content h3 { font-size: 1.4rem; }
.post-content p {
    margin-bottom: 20px;
}
.post-content ul, .post-content ol {
    margin-left: 24px;
    margin-bottom: 20px;
}
.post-content li {
    margin-bottom: 8px;
}

/* SEO content block beneath homepage fold */
.seo-section {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}
.seo-header {
    text-align: center;
    margin-bottom: 40px;
}
.seo-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.seo-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

/* Footer elements */
.main-footer {
    background-color: #04060d;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: 80px;
}
.footer-cols {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo-col p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 16px;
}
.footer-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: var(--accent-primary);
    padding-left: 4px;
}
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Admin Dashboard layout styling */
.admin-container {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 260px;
    background-color: #090d1f;
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
}
.admin-sidebar-logo {
    margin-bottom: 40px;
    padding-left: 10px;
}
.admin-menu {
    list-style: none;
}
.admin-menu li {
    margin-bottom: 8px;
}
.admin-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}
.admin-menu-link:hover, .admin-menu-link.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.admin-menu-link.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(138, 43, 226, 0.1) 100%);
    border-left: 3px solid var(--accent-primary);
}
.admin-main {
    flex: 1;
    padding: 40px;
    background-color: #070913;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.admin-title {
    font-size: 1.75rem;
    font-weight: 800;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #000;
    font-weight: 700;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    filter: brightness(1.1);
}

.login-card {
    max-width: 420px;
    margin: 100px auto;
}

/* Alert Boxes */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 0.9rem;
}
.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: #34d399;
}
.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: #f87171;
}

/* Loading indicators */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Grid Media Queries */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tools-grid, .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* Add dynamic mobile menu if needed, or stack links */
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .tools-grid, .blog-grid {
        grid-template-columns: 1fr;
    }
    .footer-cols {
        grid-template-columns: 1fr;
    }
    .tool-field-group {
        flex-direction: column;
    }
    .btn-action {
        width: 100%;
    }
    .admin-container {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .admin-main {
        padding: 24px;
    }
}
