/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: #00ff88;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Login Card */
.login-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 48px;
}

.logo h1 {
    font-size: 28px;
    color: #fff;
    margin-top: 10px;
}

.login-card h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 10px;
    font-size: 24px;
}

.subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #2d2d44;
    border-radius: 8px;
    background: #0f0f1a;
    color: #fff;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff88;
}

.form-group input::placeholder {
    color: #555;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: #00ff88;
    color: #0f0f1a;
    width: 100%;
}

.btn-primary:hover {
    background: #00cc6a;
    text-decoration: none;
}

.btn-secondary {
    background: #2d2d44;
    color: #fff;
    width: 100%;
}

.btn-secondary:hover {
    background: #3d3d54;
    text-decoration: none;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    color: #00ff88;
}

.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
}

/* Email Sent State */
.email-sent {
    text-align: center;
}

.email-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.email-sent h3 {
    color: #fff;
    margin-bottom: 10px;
}

.email-sent p {
    color: #888;
    margin-bottom: 10px;
}

.email-sent .hint {
    font-size: 14px;
    color: #666;
}

.divider {
    margin: 30px 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #2d2d44;
}

.divider span {
    background: #1a1a2e;
    padding: 0 15px;
    position: relative;
    color: #666;
    font-size: 14px;
}

/* Footer Links */
.footer-links {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2d2d44;
}

.footer-links p {
    color: #666;
    font-size: 14px;
}

/* Navbar */
.navbar {
    background: #1a1a2e;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2d2d44;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-email {
    color: #888;
    font-size: 14px;
}

/* Dashboard Container */
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.dashboard-header h1 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 10px;
}

.dashboard-header p {
    color: #888;
}

/* Keys Grid */
.keys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Key Card */
.key-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #2d2d44;
    transition: border-color 0.2s;
}

.key-card:hover {
    border-color: #3d3d54;
}

.key-card.key-inactive {
    opacity: 0.7;
}

.key-header {
    margin-bottom: 16px;
}

.key-type {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-test {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.badge-basic {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.badge-full {
    background: rgba(156, 39, 176, 0.2);
    color: #ce93d8;
}

.badge-active {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.badge-suspended {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

.badge-inactive {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

/* Key Prefix */
.key-prefix {
    margin-bottom: 20px;
}

.key-prefix code {
    display: block;
    background: #0f0f1a;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    color: #00ff88;
    word-break: break-all;
}

/* Key Details */
.key-details {
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #2d2d44;
    font-size: 14px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: #888;
}

.detail-row .value {
    color: #fff;
}

/* Key Action */
.key-action {
    margin-top: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #1a1a2e;
    border-radius: 12px;
    margin-bottom: 40px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #fff;
    margin-bottom: 10px;
}

.empty-state p {
    color: #888;
    margin-bottom: 20px;
}

.empty-state .btn {
    width: auto;
}

/* Docs Section */
.docs-section {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.docs-section h2 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 16px;
}

.code-block {
    background: #0f0f1a;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    color: #00ff88;
}

/* Help Section */
.help-section {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
}

.help-section h2 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 12px;
}

.help-section p {
    color: #888;
}

/* Footer */
.dashboard-footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .navbar {
        padding: 15px;
    }
    
    .nav-right {
        gap: 10px;
    }
    
    .user-email {
        display: none;
    }
    
    .keys-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header h1 {
        font-size: 24px;
    }
}
