/* Main CSS - Base styles, layout, container, body, buttons, forms */

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

/* Body styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    padding: 0;
}

/* Header Bar */
.header-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.site-logo {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    cursor: pointer;
    color: white;
    transition: opacity 0.2s;
}

.site-logo:hover {
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-username {
    font-size: 14px;
    font-weight: 500;
}

.header-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin: 0;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.header-btn.secondary {
    background: rgba(220, 53, 69, 0.8);
    border-color: rgba(220, 53, 69, 0.9);
}

.header-btn.secondary:hover {
    background: rgba(220, 53, 69, 0.9);
}

/* Button Bar */
.button-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 30px;
}

.button-bar-content {
    width: 100%;
    text-align: center;
}

.button-bar-text {
    font-size: 14px;
    color: #495057;
}

.button-bar-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.button-bar-text a:hover {
    text-decoration: underline;
}

/* Offline banner */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #dc3545;
    color: white;
    padding: 12px 20px;
    text-align: center;
    z-index: 10000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: none;
}

.offline-banner.show {
    display: block;
}

/* Container */
.container {
    width: 100%;
    margin: 0 auto;
    background: white;
    min-height: calc(100vh - 120px);
    padding: 0;
}

/* Headings */
h1 {
    margin-bottom: 20px;
    color: #333;
}

/* Form groups and inputs */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Buttons */
button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

button:hover {
    background: #0056b3;
}

button.secondary {
    background: #6c757d;
}

button.secondary:hover {
    background: #545b62;
}

button.danger {
    background: #dc3545;
}

button.danger:hover {
    background: #c82333;
}

/* Error and success messages */
.error {
    color: #dc3545;
    margin-top: 10px;
    font-size: 14px;
}

.success {
    color: #28a745;
    margin-top: 10px;
    font-size: 14px;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.user-info {
    float: right;
    margin-bottom: 20px;
}

/* Home Page Styles */
.home-section {
    padding: 40px 60px;
    width: 100%;
}

.home-hero {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: -40px -60px 40px;
    color: white;
    border-radius: 0;
}

.home-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

.home-subtitle {
    font-size: 20px;
    opacity: 0.95;
    font-weight: 400;
}

.home-content {
    padding: 20px 0;
}

.home-section-block {
    margin-bottom: 50px;
}

.home-section-block h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.home-section-block p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature-item h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

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

.how-it-works-list {
    list-style: none;
    counter-reset: step-counter;
    padding-left: 0;
}

.how-it-works-list li {
    counter-increment: step-counter;
    margin-bottom: 20px;
    padding-left: 60px;
    position: relative;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

.how-it-works-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: -5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.home-cta {
    text-align: center;
    margin-top: 60px;
    padding: 40px 0;
}

.cta-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 0;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Auth Modal Styles */
.auth-modal-content {
    max-width: 450px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    margin: 0;
}

.modal-close:hover {
    color: #333;
    background: transparent;
}

/* App Section Adjustments */
#appSection {
    padding: 20px;
}

#appSection h1 {
    margin-top: 0;
}
