/* DevRoute — Global Styles */

/* =========================================
   LAYOUT
   ======================================= */
.wd-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* =========================================
   SIDEBAR
   ======================================= */
.wd-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #181826;
    border-right: 1px solid rgba(99,102,241,.15);
    display: flex;
    flex-direction: column;
    transition: width .25s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.wd-sidebar-logo {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(99,102,241,.1);
}

.wd-nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem 1.25rem;
    border-radius: .5rem;
    margin: .125rem .75rem;
    font-size: .875rem;
    font-weight: 500;
    color: #94a3b8;
    transition: all .15s ease;
    text-decoration: none;
    cursor: pointer;
}

.wd-nav-item:hover {
    background: rgba(99,102,241,.1);
    color: #a5b4fc;
}

.wd-nav-item.active {
    background: rgba(99,102,241,.2);
    color: #818cf8;
    border-left: 3px solid #6366f1;
    padding-left: calc(1.25rem - 3px);
}

.wd-nav-section {
    padding: 1rem 1.25rem .25rem;
    font-size: .7rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* =========================================
   MAIN CONTENT
   ======================================= */
.wd-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0a0a18;
}

.wd-topbar {
    height: 60px;
    border-bottom: 1px solid rgba(99,102,241,.1);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    background: #111120;
    flex-shrink: 0;
    gap: 1rem;
}

.wd-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* =========================================
   CARDS
   ======================================= */
.wd-card {
    background: #181826;
    border: 1px solid rgba(99,102,241,.12);
    border-radius: .875rem;
    padding: 1.5rem;
    transition: border-color .2s, box-shadow .2s;
}

.wd-card:hover {
    border-color: rgba(99,102,241,.3);
    box-shadow: 0 4px 24px rgba(99,102,241,.08);
}

.wd-stat-card {
    background: linear-gradient(135deg, #181826 0%, #1e1e30 100%);
    border: 1px solid rgba(99,102,241,.15);
    border-radius: .875rem;
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.wd-stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(20px, -20px);
}

/* =========================================
   API CARD (browse listing)
   ======================================= */
.api-card {
    background: #181826;
    border: 1px solid rgba(99,102,241,.12);
    border-radius: .875rem;
    padding: 1.25rem;
    transition: all .2s ease;
    text-decoration: none;
    display: block;
}

.api-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99,102,241,.4);
    box-shadow: 0 8px 32px rgba(99,102,241,.12);
}

/* =========================================
   FORMS
   ======================================= */
.wd-input {
    width: 100%;
    background: #111120;
    border: 1px solid rgba(99,102,241,.2);
    border-radius: .5rem;
    padding: .625rem 1rem;
    color: #f1f5f9;
    font-size: .875rem;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.wd-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.wd-input::placeholder { color: #475569; }

.wd-label {
    display: block;
    font-size: .8125rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: .375rem;
}

.wd-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-weight: 600;
    font-size: .875rem;
    padding: .625rem 1.5rem;
    border-radius: .5rem;
    border: none;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    text-decoration: none;
}

.wd-btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.wd-btn-primary:active { transform: translateY(0); }

.wd-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: rgba(99,102,241,.12);
    color: #818cf8;
    font-weight: 600;
    font-size: .875rem;
    padding: .625rem 1.5rem;
    border-radius: .5rem;
    border: 1px solid rgba(99,102,241,.25);
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

.wd-btn-secondary:hover {
    background: rgba(99,102,241,.2);
    border-color: rgba(99,102,241,.4);
}

.wd-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(239,68,68,.12);
    color: #f87171;
    font-weight: 600;
    font-size: .875rem;
    padding: .625rem 1.5rem;
    border-radius: .5rem;
    border: 1px solid rgba(239,68,68,.25);
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

.wd-btn-danger:hover { background: rgba(239,68,68,.2); }

/* =========================================
   TABLES
   ======================================= */
.wd-table { width: 100%; border-collapse: collapse; }
.wd-table th {
    padding: .75rem 1rem;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
    border-bottom: 1px solid rgba(99,102,241,.1);
    text-align: left;
}
.wd-table td {
    padding: .875rem 1rem;
    font-size: .875rem;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(99,102,241,.06);
}
.wd-table tr:last-child td { border-bottom: none; }
.wd-table tr:hover td { background: rgba(99,102,241,.04); }

/* =========================================
   BADGES
   ======================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .6rem;
    border-radius: 9999px;
    font-size: .7rem;
    font-weight: 600;
    border: 1px solid transparent;
}

/* =========================================
   GLOW EFFECTS
   ======================================= */
.glow-primary {
    box-shadow: 0 0 30px rgba(99,102,241,.25), 0 0 60px rgba(99,102,241,.1);
}

.gradient-text {
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   HERO GRADIENT BLOB
   ======================================= */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .35;
    pointer-events: none;
}

/* =========================================
   API TESTER
   ======================================= */
.code-block {
    background: #0a0a18;
    border: 1px solid rgba(99,102,241,.2);
    border-radius: .5rem;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: .8125rem;
    color: #a5b4fc;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* =========================================
   LOADING SPINNER
   ======================================= */
.wd-spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(99,102,241,.3);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   MOBILE
   ======================================= */
@media (max-width: 768px) {
    .wd-sidebar { position: fixed; z-index: 50; height: 100vh; transform: translateX(-100%); }
    .wd-sidebar.open { transform: translateX(0); }
    .wd-layout { display: block; }
    .wd-main { height: 100vh; }
}
