/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Playfair+Display:wght@700&family=Fira+Mono&display=swap');

:root {
    --bg-color: #f5f5f0;
    --header-bg: #fffdfa;
    --primary-blue: #1e3a5f;
    --accent-gold: #b8962e;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0d8;
    --error-red: #d32f2f;
    --success-green: #388e3c;
    --code-bg: #eaebed;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, .brand {
    font-family: 'Playfair Display', serif;
    color: var(--primary-blue);
    margin-top: 0;
}

.mono {
    font-family: 'Fira Mono', monospace;
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    word-break: break-all;
}

header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.header-brand h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.header-brand span {
    color: var(--accent-gold);
}

.auth-badge {
    font-size: 0.85rem;
    color: var(--success-green);
    border: 1px solid var(--success-green);
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

main {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.container-header {
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--primary-blue);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1);
}

button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: #152b47;
}

button:active {
    transform: translateY(1px);
}

button.secondary {
    background-color: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
}

button.secondary:hover {
    background-color: rgba(30, 58, 95, 0.05);
}

/* Specific Layouts */
.login-box {
    max-width: 400px;
    margin: 80px auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
}

.account-card {
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 6px;
    text-align: center;
}

.account-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 2px solid var(--accent-gold);
}

.balance {
    font-size: 2rem;
    color: var(--primary-blue);
    font-weight: bold;
    margin: 15px 0;
}

.info-block {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-blue);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.info-block p {
    margin: 0 0 10px 0;
}
.info-block p:last-child {
    margin: 0;
}

.badge-algo {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert-error {
    background-color: #ffebee;
    color: var(--error-red);
    border: 1px solid #ffcdd2;
}

.alert-success {
    background-color: #e8f5e9;
    color: var(--success-green);
    border: 1px solid #c8e6c9;
}

/* Token visualizer */
.token-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}
.token-chunk {
    display: flex;
    font-family: 'Fira Mono', monospace;
    font-size: 0.85rem;
}
.token-chunk .iv { color: #d32f2f; font-weight: bold; }
.token-chunk .cipher { color: #1976d2; }

/* Playground Layout */
.playground-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.request-builder textarea {
    width: 100%;
    height: 80px;
    font-family: 'Fira Mono', monospace;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
}

.response-viewer {
    background: #25282c;
    color: #a9b7c6;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Fira Mono', monospace;
    min-height: 100px;
    white-space: pre-wrap;
}

.status-code {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: bold;
    margin-bottom: 10px;
}
.status-200 { background: #388e3c; color: white; }
.status-403 { background: #d32f2f; color: white; }
.status-422 { background: #f57c00; color: white; }
.status-400 { background: #7b1fa2; color: white; }

nav a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: bold;
    margin-left: 20px;
}
nav a:hover {
    color: var(--accent-gold);
}
