/* ========================================
   MountGo - Dark Gray Theme
   ======================================== */

/* Color Variables */
:root {
    --background1: #1e1e1e;
    --background2: #252525;
    --surface1: #2a2a2a;
    --surface2: #313131;
    --content: #e0e0e0;
    --content2: #9a9a9a;
    --border1: #3a3a3a;
    --border2: #444444;
    --blue1: #2a7de1;
    --blue2: #6bb8ff;
    --darkBlue: #2563ab;
    --green1: #5db329;
    --green2: #7ecb4f;
    --orange1: #f0a030;
    --orange2: #e07820;
    --red1: #e03050;
    --yellow1: #f2d000;
    --yellow2: #3a3010;
    --darkYellow: #c8a800;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html, body {
    background: var(--background1);
    color: var(--content);
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    height: 100%;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4 {
    margin: 0 0 15px;
    color: var(--content);
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }

a {
    color: var(--blue1);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--content);
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    padding: 10px;
    width: 100%;
    margin-bottom: 15px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--orange1);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--content2);
}

/* Buttons */
.btn {
    background-image: linear-gradient(165deg, var(--orange1) 50%, var(--orange2) 100%);
    background-position: 100% 100%;
    background-size: 200%;
    border: none;
    border-radius: 4px;
    box-shadow: 0 0 1px rgba(255, 255, 255, 0) inset, 0 0 2px rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    line-height: 23px;
    padding: 10px 25px;
    text-align: center;
    text-decoration: none;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    width: auto;
}

.btn:hover {
    background-position: 0 0;
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 1px 3px rgba(0, 0, 0, 0.5);
    text-decoration: none;
}

.btn-sm {
    font-size: 13px;
    padding: 5px 15px;
}

.btn-secondary {
    background-image: linear-gradient(165deg, var(--blue1) 50%, var(--darkBlue) 100%);
}

.btn-danger {
    background-image: linear-gradient(165deg, #e74c3c 50%, #c0392b 100%);
}

.btn-success {
    background-image: linear-gradient(165deg, var(--green1) 50%, var(--green2) 100%);
}

/* Welcome Page */
.welcome-container {
    background:
        linear-gradient(to bottom, rgba(235,240,248,0.52), rgba(228,234,244,0.62)),
        url("/static/images/lp_bg2.jpg") 50% 40% / cover no-repeat;
    min-height: 100vh;
    padding-top: 60px;
}

.welcome-header {
    text-align: center;
    margin-bottom: 60px;
}

.welcome-header h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: normal;
    margin: 0;
    text-shadow: 0 1px 3px rgba(255,255,255,0.5);
}

.welcome-header h1 strong {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

.lp-container {
    margin: 0 auto;
    max-width: 900px;
    padding: 0 15px;
}

.welcome-content {
    align-items: stretch;
    display: flex;
    justify-content: space-between;
}

.welcome-register-box,
.welcome-signin-box {
    background: rgba(255, 255, 255, 0.96);
    border-top: 3px solid #3a7cb8;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    color: #333;
}

.welcome-register-box {
    display: flex;
    flex: 0 0 550px;
    margin-right: 30px;
}

.welcome-signin-box {
    flex: 0 0 280px;
}

.welcome-register-form {
    flex: 0 0 46%;
    margin-right: 30px;
}

.welcome-box-header {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.value-prop {
    margin: 20px 0 15px;
    padding: 0;
}

.value-prop li {
    list-style-type: none;
    margin: 0 0 15px;
}

.value-prop h3 {
    margin: 0;
    font-size: 16px;
    font-weight: normal;
    color: #555;
}

.value-prop strong {
    font-size: 20px;
    margin-right: 5px;
    color: #3a7cb8;
}

.welcome-screenshot {
    box-shadow: 0 3px 5px 2px rgba(0, 0, 0, 0.5);
    max-width: 96%;
    margin-top: 20px;
}

/* Form Groups */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--content);
}

.form-group input {
    margin-bottom: 0;
}

/* Welcome page form overrides (light mode) */
.welcome-container input[type="text"],
.welcome-container input[type="email"],
.welcome-container input[type="password"],
.welcome-container input[type="number"],
.welcome-container select,
.welcome-container textarea {
    background: #fff;
    border: 1px solid #d0d5dd;
    color: #333;
}

.welcome-container input::placeholder,
.welcome-container textarea::placeholder {
    color: #999;
}

.welcome-container input:focus,
.welcome-container select:focus,
.welcome-container textarea:focus {
    border-color: #3a7cb8;
}

.welcome-container .error {
    background: rgba(206, 24, 54, 0.08);
    color: #c0392b;
    border: 1px solid rgba(206, 24, 54, 0.25);
}

.welcome-container .auth-links a {
    color: #666;
}

.welcome-container .auth-links a:hover {
    color: #3a7cb8;
}

.welcome-container .btn {
    background-image: linear-gradient(165deg, #3a7cb8 50%, #2d6194 100%);
}

.auth-links {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* Error Messages */
.error {
    background: rgba(206, 24, 54, 0.15);
    color: #ff6b7a;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
    border: 1px solid rgba(206, 24, 54, 0.3);
}

.lp-error {
    color: #ff6b7a;
    font-size: 13px;
    margin-bottom: 10px;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--surface1);
    border-right: 1px solid var(--border1);
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border1);
}

.sidebar-header h1 {
    font-size: 20px;
    color: var(--blue1);
    margin: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: block;
    padding: 8px 10px;
    border-radius: 4px;
    color: var(--content);
}

.sidebar-nav a:hover {
    background: var(--surface2);
    text-decoration: none;
}

.sidebar-nav a.active {
    background: var(--blue1);
    color: #fff;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    max-width: calc(100% - 250px);
}

/* Header Bar */
.header-bar {
    background: var(--surface1);
    border-bottom: 1px solid var(--border1);
    padding: 15px 20px;
    margin: -20px -20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-bar h2 {
    margin: 0;
    font-size: 20px;
    color: var(--content);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu span {
    color: var(--content2);
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-header h2 {
    margin: 0;
}

.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.list-card {
    background: var(--surface1);
    border: 1px solid var(--border1);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.2s;
}

.list-card:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    border-color: var(--border2);
}

.list-card h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.list-card h3 a {
    color: var(--content);
}

.list-card h3 a:hover {
    color: var(--blue1);
}

.list-card p {
    color: var(--content2);
    font-size: 13px;
    margin-bottom: 15px;
}

.list-card-actions {
    display: flex;
    gap: 10px;
}

/* List View */
.list-view {
    background: var(--surface1);
    border: 1px solid var(--border1);
    border-radius: 5px;
    padding: 20px;
}

.list-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border1);
}

.list-header h2 {
    margin: 0 0 5px;
}

.list-description {
    color: var(--content2);
    margin: 0;
}

/* Category */
.category {
    margin-bottom: 25px;
}

.category-header {
    background: var(--surface2);
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.category-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--content);
}

/* Items Table */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.items-table th,
.items-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px dotted var(--border1);
    color: var(--content);
}

.items-table th {
    font-weight: 600;
    color: var(--content2);
    border-bottom: 1px solid var(--border2);
}

.items-table td:last-child {
    text-align: right;
}

/* Add Forms */
.add-form {
    background: var(--surface2);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.add-form h4 {
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--content2);
}

.add-form-inline {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.add-form-inline .form-group {
    flex: 1;
    margin-bottom: 0;
}

.add-form-inline .form-group input,
.add-form-inline .form-group select {
    margin-bottom: 0;
}

/* Share Page */
.share-container {
    background: var(--surface1);
    border: 1px solid var(--border1);
    border-radius: 5px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.share-url-box {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.share-url-box input {
    flex: 1;
    margin-bottom: 0;
    background: var(--surface2);
}

/* Footer */
.footer {
    color: var(--content2);
    text-align: center;
    padding: 40px 0 20px;
    font-size: 12px;
}

.welcome-footer {
    background: rgba(255, 255, 255, 0.8);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(0,0,0,0.45);
}

/* Responsive */
@media (max-width: 900px) {
    .welcome-content {
        flex-direction: column;
        align-items: center;
    }

    .welcome-register-box {
        flex: none;
        width: 100%;
        max-width: 520px;
        margin-right: 0;
        margin-bottom: 20px;
        flex-direction: column;
    }

    .welcome-register-form {
        flex: none;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .welcome-signin-box {
        flex: none;
        width: 100%;
        max-width: 520px;
        order: -1;
        margin-bottom: 20px;
    }

    .welcome-header {
        margin-bottom: 30px;
    }

    .welcome-header h1 strong {
        font-size: 28px;
    }

    .welcome-header h1 {
        font-size: 22px;
    }
    
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        max-width: calc(100% - 200px);
    }
}

@media (max-width: 600px) {
    .welcome-container {
        padding-top: 90px;
        animation: welcomeIn 0.12s ease both;
    }
    @keyframes welcomeIn { from { opacity: 0; } to { opacity: 1; } }

    .welcome-register-box,
    .welcome-signin-box {
        padding: 30px;
    }

    .welcome-header {
        margin-bottom: 40px;
    }

    .welcome-header h1 strong {
        font-size: 34px;
    }

    .welcome-header h1 {
        font-size: 22px;
    }

    .welcome-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 14px 30px 24px;
        font-size: 14px;
        margin-top: 0;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
    }

    .add-form-inline {
        flex-direction: column;
    }
}
