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

:root {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-card: #1e2433;
    --bg-input: #141922;
    --border-color: #2d3548;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --accent-blue: #5865f2;
    --accent-blue-hover: #4752c4;
    --accent-red: #ed4245;
    --accent-green: #57f287;
    --accent-yellow: #fee75c;
    --accent-orange: #ff8c42;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 700px;
}

.login-card, .dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 60px 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    position: relative;
}

.logo-circle {
    width: 40px;
    height: 40px;
    background: var(--accent-blue);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.logo-wave {
    position: absolute;
    border: 3px solid var(--accent-orange);
    border-radius: 50%;
    animation: wave 2s ease-out infinite;
}

.logo-wave:nth-child(1) {
    width: 50px;
    height: 50px;
    top: 15px;
    left: 15px;
    animation-delay: 0s;
}

.logo-wave:nth-child(2) {
    width: 65px;
    height: 65px;
    top: 7.5px;
    left: 7.5px;
    animation-delay: 0.3s;
}

.logo-wave:nth-child(3) {
    width: 80px;
    height: 80px;
    top: 0;
    left: 0;
    animation-delay: 0.6s;
}

@keyframes wave {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

h1 {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 8px;
    font-weight: 500;
}

.server-info {
    font-size: 16px;
    color: var(--accent-blue);
    text-align: center;
    margin-bottom: 40px;
}

.instruction-text {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.info-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.info-icon {
    font-size: 20px;
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-yellow);
}

.info-content {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

.btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.btn-discord {
    background: var(--accent-blue);
    color: white;
}

.btn-discord:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.4);
}

.footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.oauth-info {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    margin-top: 16px;
}

.error-message {
    background: rgba(237, 66, 69, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background: rgba(87, 242, 135, 0.1);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* Dashboard Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(87, 242, 135, 0.1);
    border: 1px solid var(--accent-green);
    border-radius: 20px;
    font-size: 14px;
    color: var(--accent-green);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-badge {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--accent-green);
    font-weight: 500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.panel-icon {
    font-size: 24px;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
}

.panel-content {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.alarm-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.form-select, .form-textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-select {
    cursor: pointer;
}

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

.btn-trigger {
    background: var(--accent-red);
    color: white;
}

.btn-trigger:hover:not(:disabled) {
    background: #c63437;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(237, 66, 69, 0.4);
}

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

.no-alarms {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.alarm-item {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.alarm-item:last-child {
    margin-bottom: 0;
}

.alarm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.alarm-type {
    font-weight: 600;
    font-size: 14px;
}

.alarm-level {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.alarm-level-1 {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.alarm-level-2 {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.alarm-level-3 {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.alarm-level-4 {
    background: rgba(139, 0, 0, 0.2);
    color: #8b0000;
}

.alarm-reason {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}

.alarm-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

.btn-logout {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-logout:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
    }
    
    .login-card, .dashboard-card {
        padding: 40px 30px;
    }
}
