/* ==============================================
   kort.mahl.us - Main Stylesheet
   ============================================== */

:root {
    --primary-color: #2C3E50;
    --secondary-color: #3498DB;
    --accent-color: #E74C3C;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --border-color: #BDC3C7;
    --bg-light: #ECF0F1;
    --bg-white: #FFFFFF;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ==============================================
   Navigation
   ============================================== */

.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

/* ==============================================
   Hero Section
   ============================================== */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ==============================================
   Buttons
   ============================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: #2980B9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #D5DBDB;
}

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

.btn-danger:hover {
    background-color: #C0392B;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* ==============================================
   Features Section
   ============================================== */

.features {
    padding: 4rem 2rem;
    background-color: var(--bg-white);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* ==============================================
   CTA Section
   ============================================== */

.cta-section {
    padding: 4rem 2rem;
    background-color: var(--bg-light);
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* ==============================================
   Auth Pages
   ============================================== */

.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.auth-box {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 450px;
    width: 100%;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* ==============================================
   Forms
   ============================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: block;
}

.error-message {
    background-color: #fadbd8;
    color: var(--accent-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-color);
}

/* ==============================================
   My Designs Page
   ============================================== */

.my-designs-page {
    min-height: calc(100vh - 200px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.design-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.design-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.design-preview {
    width: 100%;
    height: 250px;
    background-color: var(--bg-light);
}

.design-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
}

.preview-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.design-info {
    padding: 1.5rem;
}

.design-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.design-meta {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.design-date {
    color: var(--text-light);
    font-size: 0.75rem;
}

.design-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

/* ==============================================
   Designer Page
   ============================================== */

.designer-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 100px);
}

.designer-sidebar {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: fit-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.designer-sidebar h2 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.control-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.control-section:last-child {
    border-bottom: none;
}

.control-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

#mapContainer {
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.designer-preview {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
}

.designer-preview h2 {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.preview-container {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: auto;
    cursor: grab;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-container:active {
    cursor: grabbing;
}

#previewCanvas {
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: var(--shadow-hover);
    background-color: white;
    transition: transform 0.1s ease;
    transform-origin: center center;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.zoom-controls button {
    min-width: 36px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-light);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==============================================
   Footer
   ============================================== */

.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-container p {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
}

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

/* ==============================================
   Responsive
   ============================================== */

@media (max-width: 968px) {
    .designer-container {
        grid-template-columns: 1fr;
    }

    .designer-sidebar {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .features h2 {
        font-size: 2rem;
    }
}
