:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Cairo', 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.no-transition * {
    transition: none !important;
}

/* Light Mode Variables override */
body.light-mode {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-mode .navbar {
    background: rgba(248, 250, 252, 0.8);
    border-bottom-color: var(--border);
}

body.light-mode .logo-text {
    background: linear-gradient(135deg, #0f172a, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .site-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-mode .site-benefit {
    background: #f1f5f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Navbar Style */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    object-fit: cover;
}

.logo-text {
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #fff, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-btn.primary {
    background: var(--primary);
    border: none;
    color: white;
}

.nav-btn.primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Hero Section */
.hero {
    padding: 4rem 2rem 2rem;
    text-align: center;
    background: radial-gradient(circle at top center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .highlight {
    color: var(--primary);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
}

.search-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.search-icon {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.5rem 1rem;
    width: 100%;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
}

/* Sidebar Filters */
.filters-section {
    position: sticky;
    top: 5rem;
    height: fit-content;
}

.filter-title {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 600;
}

.chip:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Results Content */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#results-count {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sort-dropdown {
    position: relative;
    display: inline-block;
}

.sort-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    z-index: 1;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-card) url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236366f1%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") no-repeat left 1rem top 50%;
    background-size: 0.65rem auto;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    padding-right: 2.8rem;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.custom-select:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
}

.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.custom-select option, .suggest-form select option {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
}

.custom-select option:disabled, .suggest-form select option:disabled {
    color: var(--text-muted) !important;
}

/* Sites Grid & Cards */
.sites-grid {
    column-width: 300px;
    column-gap: 1.5rem;
    width: 100%;
}

.site-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    break-inside: avoid;
    margin-bottom: 1.5rem;
    width: 100%;
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

.site-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.site-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0.9rem;
    gap: 0.45rem;
}

.site-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    width: 100%;
    line-height: 1.4;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.site-name::before {
    content: '\f35d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    opacity: 0.6;
    flex-shrink: 0;
}

.url-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    min-width: 0;
}

.site-name:hover {
    color: var(--primary-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.category-badge {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent);
    padding: 0.18rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    align-self: flex-start;
    letter-spacing: 0.3px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.site-desc {
    color: var(--text-muted);
    font-size: 0.91rem;
    line-height: 1.8;
    padding-bottom: 0.6rem;
}

/* Card body: description at top, benefit pushed to bottom */
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.site-benefit {
    margin-top: auto;
    padding: 0.75rem 0 0 0;
    border-top: 1px dashed rgba(16, 185, 129, 0.35);
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.benefit-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.benefit-label::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
}

/* Share Button */
.share-btn {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    transition: var(--transition);
    opacity: 0.7;
    z-index: 10;
}

.site-card:hover .share-btn {
    opacity: 1;
}

.share-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}

/* Share Toast Notification */
.share-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.share-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Footer */
.footer {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--glass-shadow);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-header h2 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: var(--primary);
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.suggest-form .form-group {
    margin-bottom: 1.2rem;
}

.suggest-form label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
}

.suggest-form input,
.suggest-form select,
.suggest-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

body.light-mode .suggest-form input,
body.light-mode .suggest-form select,
body.light-mode .suggest-form textarea {
    background: rgba(255, 255, 255, 0.5);
}

.suggest-form input:focus,
.suggest-form select:focus,
.suggest-form textarea:focus {
    border-color: var(--primary);
}

/* Custom SVG arrow for Suggestion Form Selects */
.suggest-form select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236366f1%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem top 50%;
    background-size: 0.65rem auto;
    padding-left: 2.5rem;
}

.suggest-form select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.suggest-form textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-submit {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.modal-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.sug-msg {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.sug-msg.success {
    color: var(--accent);
}

.sug-msg.error {
    color: #ef4444;
}

/* Responsive Desgin */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    .filters-section {
        position: static;
        margin-bottom: 1rem;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 0.8rem 1rem;
    }
    .nav-logo {
        width: 30px;
        height: 30px;
    }
    .logo-text {
        font-size: 1.1rem;
    }
    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        gap: 0.3rem;
    }
    .theme-toggle i {
        font-size: 0.9rem;
    }
    .hero {
        padding: 2rem 1rem 1.5rem;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    .container {
        padding: 1rem;
        gap: 1.5rem;
    }
    .search-box {
        padding: 0.6rem 1rem;
    }
    .search-box input {
        font-size: 0.95rem;
    }
    .sites-grid {
        column-width: 100%;
    }
    .site-card {
        padding: 1.2rem;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    .modal-header h2 {
        font-size: 1.3rem;
    }
    .suggest-form input,
    .suggest-form select,
    .suggest-form textarea {
        font-size: 0.95rem;
        padding: 0.6rem 0.8rem;
    }
    .footer {
        padding: 2rem 1rem;
    }
}

/* Shimmer Loading Animation */
@keyframes shimmer {
    0% { background-position: -468px 0 }
    100% { background-position: 468px 0 }
}

.shimmer-card {
    height: 250px;
    background: #1e293b;
    background-image: linear-gradient(to right, #1e293b 0%, #334155 20%, #1e293b 40%, #1e293b 100%);
    background-repeat: no-repeat;
    background-size: 800px 104px;
    border-radius: 20px;
    animation: shimmer 1.5s infinite linear forward;
}

/* Suggestion Form Feedback Messages */
.sug-msg {
    margin-top: 1rem;
    padding: 0;
    border-radius: 12px;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s ease;
}

.sug-msg.success {
    padding: 1rem;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.sug-msg.error {
    padding: 1rem;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --- Search Autocomplete Styles --- */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.suggestions-dropdown.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

/* Scrollbar for suggestions */
.suggestions-dropdown::-webkit-scrollbar {
    width: 6px;
}
.suggestions-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.suggestions-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
body.light-mode .suggestions-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

.suggestion-group-title {
    padding: 0.8rem 1.2rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-item {
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

body.light-mode .suggestion-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover, .suggestion-item.selected {
    background: rgba(99, 102, 241, 0.1);
}

.suggestion-icon {
    color: var(--text-muted);
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.suggestion-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

mark.highlight-text {
    background: transparent;
    color: var(--primary);
    font-weight: 800;
}

body.light-mode mark.highlight-text {
    color: var(--primary-hover);
}

/* Empty State / No Results */
.empty-state-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px dashed var(--border);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    color: var(--text-muted);
    max-width: 400px;
    margin-bottom: 2rem;
}

/* Load More Spinner */
.load-more-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================================
   IP GATE OVERLAY — نظام حماية الوصول
   ================================================ */

.ip-gate-overlay {
    position: fixed;
    inset: 0;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
    transition: opacity 0.4s ease;
}

.ip-gate-overlay.hidden {
    display: none;
}

.ip-gate-overlay.fading {
    opacity: 0;
    pointer-events: none;
}

.ip-gate-card {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 24px;
    padding: 2.8rem 2.5rem 2.4rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.12),
        0 25px 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(99, 102, 241, 0.08);
    animation: gateEntrance 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
    overflow: hidden;
}

.ip-gate-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 60% 20%, rgba(99,102,241,0.06) 0%, transparent 60%);
    pointer-events: none;
}

@keyframes gateEntrance {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.93);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ip-gate-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 2rem;
}

.ip-gate-logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
}

.ip-gate-logo span {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 30%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.ip-gate-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(168,85,247,0.18));
    border: 2px solid rgba(99, 102, 241, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.4rem;
    font-size: 1.75rem;
    color: #818cf8;
    animation: lockPulse 2.5s ease-in-out infinite;
}

@keyframes lockPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.35);
    }
    50% {
        box-shadow: 0 0 0 14px rgba(99, 102, 241, 0);
    }
}

.ip-gate-card h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 0.4rem;
}

.ip-gate-card > p {
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 0.93rem;
    line-height: 1.5;
}

.ip-gate-input-wrap {
    position: relative;
    margin-bottom: 0.85rem;
}

.ip-gate-input-wrap input {
    width: 100%;
    padding: 0.9rem 3.2rem 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.28);
    border-radius: 14px;
    color: #f1f5f9;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    text-align: right;
    box-sizing: border-box;
    direction: ltr;
    letter-spacing: 0.1em;
}

.ip-gate-input-wrap input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.ip-gate-input-wrap input::placeholder {
    color: #475569;
    letter-spacing: normal;
    direction: rtl;
}

#ip-gate-toggle-pwd {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

#ip-gate-toggle-pwd:hover {
    color: #818cf8;
}

#ip-gate-submit {
    width: 100%;
    padding: 0.95rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #a855f7 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    margin-bottom: 0.9rem;
    letter-spacing: 0.02em;
}

#ip-gate-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.45);
}

#ip-gate-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

#ip-gate-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.ip-gate-msg {
    font-size: 0.88rem;
    min-height: 1.4em;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    transition: all 0.3s;
    text-align: center;
}

.ip-gate-msg:empty {
    padding: 0;
}

.ip-gate-msg.error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.ip-gate-msg.success {
    color: #86efac;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.ip-gate-msg.checking {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}
