@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght:600;700&family=Source+Sans+Pro:wght@300;400;700&display=swap');

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

:root {
    /* MoreDevs.ai Color Scheme */
    --primary-bg: #161616;
    --primary-teal: #598787;
    --primary-teal-light: #81CCCC;
    --button-bg: #2F4F4F;
    --button-hover: #3a6363;
    --error-color: #ef4444;
    --success-color: #10b981;
    --text-primary: #FFFFFF;
    --text-secondary: #A4A4A4;
    --text-muted: #6B7280;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 2px 6px 0px rgba(0,0,0,0.3);
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--primary-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 80px 20px;
    color: var(--text-primary);
}

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

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 40px;
    animation: slideUp 0.4s ease-out;
    backdrop-filter: blur(10px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.header p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 300;
}

.form-container {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.form-container h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: 'Source Sans Pro', sans-serif;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 2px rgba(89, 135, 135, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.btn {
    width: 100%;
    min-height: 56px;
    padding: 8px 32px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary {
    background: var(--button-bg);
    color: var(--text-primary);
    margin-top: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--button-hover);
    box-shadow: var(--shadow);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 16px;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-oauth {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-weight: 500;
    min-height: 56px;
}

.btn-oauth:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-teal);
    box-shadow: var(--shadow);
}

.btn-oauth svg {
    flex-shrink: 0;
}

.btn-github {
    color: var(--text-primary);
}

.toggle-form {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.toggle-form a {
    color: var(--primary-teal-light);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.3s;
}

.toggle-form a:hover {
    color: var(--primary-teal);
    text-decoration: underline;
}

.error-message,
.success-message {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.success-message {
    background: rgba(16, 163, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 163, 129, 0.3);
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    background: rgba(22, 22, 22, 0.8);
    backdrop-filter: blur(10px);
}

footer a {
    color: var(--primary-teal-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary-teal);
}

@media (max-width: 480px) {
    body {
        padding: 20px 20px 80px 20px;
    }

    .auth-card {
        padding: 24px;
    }

    .header h1 {
        font-size: 24px;
    }

    .btn {
        min-height: 48px;
        padding: 8px 24px;
    }

    footer {
        font-size: 12px;
        padding: 12px;
    }
}

/* ===========================================
   Dashboard-Specific Styles
   =========================================== */

/* Dashboard body override */
body.dashboard {
    display: block;
    align-items: initial;
    justify-content: initial;
    padding: 0;
}

/* Dashboard header - horizontal layout */
.dashboard .header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    margin-bottom: 0;
    text-align: left;
}

.dashboard .header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
}

.dashboard .header button {
    padding: 12px 24px;
    background: var(--button-bg);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s;
    min-height: 48px;
}

.dashboard .header button:hover {
    background: var(--button-hover);
    box-shadow: var(--shadow);
}

/* Dashboard container */
.dashboard .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 32px 100px 32px;
}

/* Dashboard cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.card h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.card a {
    color: var(--primary-teal-light);
    text-decoration: none;
    transition: color 0.3s;
}

.card a:hover {
    color: var(--primary-teal);
    text-decoration: underline;
}

/* Info rows */
.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 {
    font-weight: 500;
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
}

/* Dashboard loading state */
.dashboard .loading {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}
