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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #fafafa;
    color: #1a1a1a;
    line-height: 1.6;
}

.wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 16px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: color 0.2s;
}

.nav a:hover {
    color: #1a1a1a;
}

/* Hero */
.hero {
    background: #fff;
    padding: 100px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.lead {
    font-size: 20px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 40px;
}

.actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: #1a1a1a;
    color: #fff;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: #f5f5f5;
    color: #1a1a1a;
}

.btn-secondary:hover {
    background: #e5e5e5;
}

.btn-outline {
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #d5d5d5;
}

.btn-outline:hover {
    background: #f5f5f5;
}

.btn-full {
    width: 100%;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-gray {
    background: #f5f5f5;
}

.section h2 {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.subtitle {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-bottom: 48px;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-item {
    text-align: center;
    padding: 24px;
}

.feature-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 14px;
    color: #666;
}

/* Pricing */
.pricing {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.plan {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.plan-popular {
    border-color: #1a1a1a;
    border-width: 2px;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
}

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

.plan-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.price {
    font-size: 36px;
    font-weight: 700;
}

.price span {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.highlight {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
}

.plan-body ul {
    list-style: none;
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    flex-grow: 1;
}

.plan-body li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.plan-body li:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 30px;
}

.footer .brand {
    color: #fff;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-links {
    display: flex;
    gap: 60px;
}

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

.link-group h4 {
    font-size: 14px;
    color: #999;
    font-weight: 600;
    margin-bottom: 8px;
}

.link-group a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
}

.link-group a:hover {
    color: #fff;
}

.copyright {
    font-size: 13px;
    color: #666;
    margin-top: 16px;
}

/* User System */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.user-menu:hover {
    background: #f5f5f5;
}

.user-menu:hover .user-dropdown {
    display: flex;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(128, 128, 128, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e6e6e6;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-email {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.user-tier {
    font-size: 12px;
    color: #aaa;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex-direction: column;
    min-width: 160px;
    margin-top: 0;
    z-index: 1000;
}

.user-dropdown a {
    padding: 10px 16px;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: #f5f5f5;
}

.user-dropdown a:first-child {
    border-radius: 4px 4px 0 0;
}

.user-dropdown a:last-child {
    border-radius: 0 0 4px 4px;
}

.hidden {
    display: none !important;
}

/* Auth Pages */
.auth-page {
    background: #fafafa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 24px;
}

.auth-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 32px;
}

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

.auth-header .brand {
    justify-content: center;
    margin-bottom: 16px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 600;
}

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

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

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn input {
    flex: 1;
}

.input-with-btn .btn {
    padding: 10px 16px;
    white-space: nowrap;
    font-size: 13px;
}

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

.auth-hint {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 16px;
}

.auth-hint a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
}

.error-message {
    background: #fef0f0;
    border: 1px solid #f56c6c;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #f56c6c;
    display: none;
}

.error-message.show {
    display: block;
}

/* Dashboard */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 61px);
    background: #fafafa;
}

.sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #e5e5e5;
    padding: 24px 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    padding: 12px 24px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

.sidebar-link.active {
    background: #f5f5f5;
    color: #1a1a1a;
    border-left-color: #1a1a1a;
    font-weight: 500;
}

.dashboard-main {
    flex: 1;
    padding: 32px;
}

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

.dashboard-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.dashboard-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 16px;
}

.dashboard-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.info-row span:first-child {
    color: #666;
}

.info-row span:last-child {
    font-weight: 500;
}

/* Usage Card */
.usage-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 24px;
}

.usage-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.usage-avatar {
    width: 48px;
    height: 48px;
    background: rgba(128, 128, 128, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e6e6e6;
    font-size: 18px;
    font-weight: 500;
}

.usage-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.usage-email {
    font-size: 16px;
    font-weight: 500;
}

.usage-tier {
    font-size: 14px;
    color: #666;
}

.usage-stats {
    margin-top: 16px;
}

.usage-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.progress-container {
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #1a1a1a;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
}

.progress-bar.warning {
    background: #e6a23c;
}

.progress-bar.danger {
    background: #f56c6c;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        padding: 12px 0;
    }
    
    .sidebar-nav {
        flex-direction: row;
        justify-content: center;
    }
    
    .sidebar-link {
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar-link.active {
        border-left-color: transparent;
        border-bottom-color: #1a1a1a;
    }
    
    .user-menu .user-info {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .features, .pricing {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 24px;
    }
}

