/* ============================================
   MAKERSPAGE - Main Stylesheet
   ============================================ */

:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --primary-light: #EEF0FF;
    --secondary: #FF6584;
    --success: #2ECC71;
    --warning: #F39C12;
    --danger: #E74C3C;
    --dark: #1A1A2E;
    --gray-900: #2D2D2D;
    --gray-700: #555555;
    --gray-500: #888888;
    --gray-300: #CCCCCC;
    --gray-100: #F5F5F5;
    --white: #FFFFFF;
    --border: #E8E8E8;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --font: 'Inter', sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--gray-100);
    line-height: 1.6;
    font-size: 16px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-wrapper {
    min-height: calc(100vh - 140px);
    padding: 40px 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.flex {
    display: flex;
    align-items: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-logo:hover {
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: var(--font);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: #e55575;
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-dark {
    background: var(--dark);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--gray-900);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   FORMS
   ============================================ */

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

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--white);
    transition: border-color 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

.form-control::placeholder {
    color: var(--gray-300);
}

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

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card-sm {
    padding: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
}

/* ============================================
   FLASH MESSAGES
   ============================================ */

.flash {
    padding: 14px 20px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}

.flash-success {
    background: #D4EDDA;
    color: #155724;
    border-bottom: 1px solid #C3E6CB;
}

.flash-error {
    background: #F8D7DA;
    color: #721C24;
    border-bottom: 1px solid #F5C6CB;
}

.flash-info {
    background: #D1ECF1;
    color: #0C5460;
    border-bottom: 1px solid #BEE5EB;
}

/* ============================================
   HOMEPAGE HERO
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #9B59B6 100%);
    color: var(--white);
    padding: 100px 20px;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3.2rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 560px;
    margin: 0 auto 36px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    font-weight: 700;
}

.btn-white:hover {
    background: var(--gray-100);
    color: var(--primary-dark);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.6);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.15);
    color: var(--white);
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
    padding: 80px 20px;
    background: var(--white);
}

.features h2 {
    text-align: center;
    margin-bottom: 12px;
}

.features-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 56px;
    font-size: 1.1rem;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius);
    background: var(--gray-100);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================
   CREATOR PAGE (public profile)
   ============================================ */

.creator-cover {
    height: 260px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
}

.creator-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-profile {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

.creator-avatar-wrap {
    margin-top: 16px;
    margin-bottom: 16px;
}

.creator-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--white);
    object-fit: cover;
    background: var(--primary-light);
    box-shadow: var(--shadow);
}

.creator-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--white);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    font-weight: 700;
    box-shadow: var(--shadow);
}

.creator-name {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.creator-username {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.creator-bio {
    color: var(--gray-700);
    max-width: 560px;
    margin-bottom: 20px;
}

.creator-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.creator-stat {
    text-align: center;
}

.creator-stat-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.creator-stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.creator-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    max-width: 860px;
    margin: 28px auto;
    padding: 0 20px 40px;
}

/* ============================================
   TIP BOX
   ============================================ */

.tip-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: sticky;
    top: 85px;
}

.tip-box h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.tip-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.tip-amount-btn {
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    font-family: var(--font);
}

.tip-amount-btn:hover,
.tip-amount-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.tip-custom {
    margin-bottom: 12px;
}

.tip-message {
    margin-bottom: 16px;
}

/* ============================================
   POSTS FEED
   ============================================ */

.post-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

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

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-light);
}

.post-meta {
    flex: 1;
}

.post-author {
    font-weight: 600;
    font-size: 0.95rem;
}

.post-time {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.post-title {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.post-content {
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 0;
}

.post-image {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-top: 16px;
}

.members-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: 8px;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.product-cover {
    height: 160px;
    background: var(--primary-light);
    object-fit: cover;
    width: 100%;
}

.product-info {
    padding: 16px;
}

.product-title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px;
    min-height: calc(100vh - 65px);
}

.dashboard-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 85px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 6px;
    font-weight: 500;
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
}

.stat-card-sub {
    font-size: 0.8rem;
    color: var(--success);
    margin-top: 4px;
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-wrapper {
    min-height: calc(100vh - 65px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--gray-100);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

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

.auth-logo a {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.auth-title {
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

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

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    background: var(--white);
    padding: 0 12px;
    color: var(--gray-500);
    font-size: 0.85rem;
    position: relative;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 40px 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand strong {
    color: var(--white);
    font-size: 1.1rem;
}

.footer-brand p {
    font-size: 0.85rem;
    margin: 4px 0 0;
    opacity: 0.7;
}

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

.footer-links a {
    color: var(--gray-300);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copy {
    width: 100%;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.5;
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .hero h1 { font-size: 2.2rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .creator-layout { grid-template-columns: 1fr; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }
    .tip-box { position: static; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
    .nav-links { gap: 12px; }
}