/* ============================================================
   TOR BROWSER THEME — prox.onl
   Full Tor Browser Bundle–inspired theme
   Applies only when <body class="tor-mode"> is active
   ============================================================ */

/* ------------------------------------------------------------
   GLOBAL TOR MODE OVERRIDES
   ------------------------------------------------------------ */
body.tor-mode {
    background: #1b0f2e;
    color: #e8d9ff;
    font-family: system-ui, sans-serif;
}

/* Hide Cloud Browser UI when in Tor mode */
body.tor-mode .browser-tabs,
body.tor-mode .browser-url-bar,
body.tor-mode #start-page,
body.tor-mode #proxy-frame {
    display: none !important;
}

/* ------------------------------------------------------------
   TOR URL BAR
   ------------------------------------------------------------ */
.tor-url-bar {
    background: #2a1844;
    padding: 12px 16px;
    border-bottom: 1px solid #3a245a;
}

.tor-url-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tor-url-icon {
    font-size: 22px;
    color: #d8b4ff;
}

.tor-url-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #5a3d7a;
    background: #1f1333;
    color: #f0e6ff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tor-url-input:focus {
    border-color: #b57aff;
    box-shadow: 0 0 0 2px rgba(181, 122, 255, 0.4);
}

.tor-url-button {
    padding: 10px 16px;
    background: #7a3cff;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.tor-url-button:hover {
    background: #9b63ff;
}

.tor-new-identity-button {
    padding: 10px 14px;
    background: #3a245a;
    border: 1px solid #5a3d7a;
    border-radius: 6px;
    color: #d8b4ff;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ------------------------------------------------------------
   TOR TABS
   ------------------------------------------------------------ */
#tor-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    background: #241536;
    border-bottom: 1px solid #3a245a;
    overflow-x: auto;
}

.tor-tab {
    padding: 6px 12px;
    background: #3a245a;
    border-radius: 6px;
    color: #e8d9ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.tor-tab.active {
    background: #7a3cff;
    color: white;
}

.tor-tab:hover {
    background: #5a3d7a;
}

.tor-tab-close {
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
}

.tor-tab-close:hover {
    opacity: 1;
}

.tor-new-tab {
    background: #2f1c47;
    font-weight: bold;
}

.tor-new-tab:hover {
    background: #4a2f6b;
}

/* ------------------------------------------------------------
   TOR START PAGE
   ------------------------------------------------------------ */
#tor-start-page {
    padding: 40px 20px;
}

.tor-empty-state {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.tor-header {
    margin-bottom: 40px;
}

.tor-logo {
    font-size: 70px;
    margin-bottom: 10px;
}

.tor-title {
    font-size: 32px;
    font-weight: 700;
    color: #e8d9ff;
    margin-bottom: 10px;
}

.tor-subtitle {
    font-size: 18px;
    color: #cbb3f5;
}

/* ------------------------------------------------------------
   TOR FEATURE CARDS
   ------------------------------------------------------------ */
.tor-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.tor-card {
    background: #2a1844;
    border: 1px solid #3a245a;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
}

.tor-card:hover {
    background: #3a245a;
    border-color: #7a3cff;
}

.tor-card-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.tor-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #e8d9ff;
}

.tor-card-text {
    font-size: 14px;
    color: #cbb3f5;
}

/* ------------------------------------------------------------
   TOR ADVANCED PANELS
   ------------------------------------------------------------ */
.tor-advanced-section {
    margin-top: 50px;
    display: grid;
    gap: 20px;
}

.tor-advanced-card {
    background: #2a1844;
    border: 1px solid #3a245a;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
}

.tor-advanced-title {
    font-size: 18px;
    font-weight: 600;
    color: #e8d9ff;
    margin-bottom: 8px;
}

.tor-advanced-text {
    font-size: 14px;
    color: #cbb3f5;
}

.tor-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ------------------------------------------------------------
   TOR IFRAME
   ------------------------------------------------------------ */
.tor-frame {
    width: 100%;
    height: calc(100vh - 180px);
    border: none;
    background: #1b0f2e;
}

/* ------------------------------------------------------------
   TOR LOGIN REQUIRED SCREEN
   ------------------------------------------------------------ */
.tor-login-required {
    padding: 60px 20px;
    text-align: center;
}

.tor-login-card {
    max-width: 500px;
    margin: 0 auto;
    background: #2a1844;
    border: 1px solid #3a245a;
    border-radius: 12px;
    padding: 40px;
}

.tor-login-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.tor-login-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
}

.tor-login-subtitle {
    font-size: 16px;
    color: #cbb3f5;
    margin-bottom: 20px;
}

.tor-login-button {
    display: inline-block;
    padding: 12px 20px;
    background: #7a3cff;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.tor-login-button:hover {
    background: #9b63ff;
}
/* ============================================================
   TOR SIDEBAR THEME
   Applies only when <aside class="sidebar tor-sidebar"> is active
   ============================================================ */

.tor-sidebar {
    background: #1b0f2e !important;
    border-right: 1px solid #3a245a !important;
    color: #e8d9ff !important;
}

/* Sidebar brand area */
.tor-sidebar .sidebar-brand-text .sidebar-subtitle {
    color: #cbb3f5 !important;
}

/* Navigation items */
.tor-sidebar .nav-item {
    color: #d8b4ff !important;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.tor-sidebar .nav-item:hover {
    background: #3a245a !important;
    color: #ffffff !important;
}

/* Active nav item (Tor Browser highlighted) */
.tor-sidebar .nav-item.active {
    background: #7a3cff !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Icons inside nav items */
.tor-sidebar .nav-icon {
    color: #d8b4ff !important;
}

.tor-sidebar .nav-item.active .nav-icon {
    color: #ffffff !important;
}

/* Sidebar bottom user chip */
.tor-sidebar .sidebar-user-chip {
    background: #2a1844 !important;
    border: 1px solid #3a245a !important;
    border-radius: 10px;
    padding: 12px;
}

.tor-sidebar .chip-label {
    color: #cbb3f5 !important;
}

.tor-sidebar .chip-id {
    color: #e8d9ff !important;
}

.tor-sidebar .chip-copy {
    background: #3a245a !important;
    border: 1px solid #5a3d7a !important;
    color: #d8b4ff !important;
    border-radius: 6px;
    cursor: pointer;
}

.tor-sidebar .chip-copy:hover {
    background: #5a3d7a !important;
}

/* Login / logout links */
.tor-sidebar .login-link,
.tor-sidebar .logout-link {
    color: #d8b4ff !important;
}

.tor-sidebar .login-link:hover,
.tor-sidebar .logout-link:hover {
    color: #ffffff !important;
}

/* Sidebar toggle button */
.tor-sidebar + .sidebar-toggle {
    background: #2a1844 !important;
    color: #d8b4ff !important;
    border: 1px solid #3a245a !important;
}

.tor-sidebar + .sidebar-toggle:hover {
    background: #3a245a !important;
    color: #ffffff !important;
}
