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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #202124;
}

/* Header */
header {
    background: #fff;
    border-bottom: 1px solid #dadce0;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo, .logo {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    text-decoration: none;
}

.header-logo .kai, .logo .kai {
    color: #4285f4;
}

.header-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-links a {
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.header-links a:hover {
    color: #202124;
}

.header-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    color: #5f6368;
}

.header-btn:hover {
    background: #f1f3f4;
}

.header-btn-primary {
    background: #4285f4;
    color: white !important;
}

.header-btn-primary:hover {
    background: #3367d6;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-avatar {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #202124;
}

.user-avatar:hover {
    background: #f1f3f4;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 100;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #202124;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
}

/* Footer */
footer {
    background: #f8f9fa;
    border-top: 1px solid #dadce0;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: #202124;
}

.footer-text {
    color: #5f6368;
    font-size: 13px;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.auth-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: #5f6368;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
}

.auth-modal-close:hover {
    color: #202124;
}

.auth-form h2 {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #5f6368;
    font-size: 14px;
    margin-bottom: 24px;
}

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

.auth-form label {
    display: block;
    margin-bottom: 6px;
    color: #202124;
    font-size: 14px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.auth-form input:focus {
    border-color: #4285f4;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-btn:hover {
    background: #3367d6;
}

.auth-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
}

.auth-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.auth-links a {
    color: #4285f4;
    text-decoration: none;
    font-size: 14px;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.auth-message.success {
    background: #e6f4ea;
    color: #137333;
    border: 1px solid #34a853;
}

.auth-message.error {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #d93025;
}

/* Common Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
}

.page-title h1 {
    font-size: 32px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 8px;
}

.page-title p {
    font-size: 16px;
    color: #5f6368;
}

.loading, .error {
    text-align: center;
    padding: 60px 20px;
    color: #5f6368;
}

.error {
    color: #d93025;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
    }
}