/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2c5f8d;
    --accent-orange: #FF9900;
    --dark-text: #1a1a1a;
    --light-bg: #f8f9fa;
    --border-gray: #ddd;
    --success-green: #28a745;
    --danger-red: #dc3545;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background: #fff;
}

/* Header */
header {
    background: var(--primary-blue);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: opacity 0.2s;
}

header nav a:hover {
    opacity: 0.8;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e4a6f 0%, var(--primary-blue) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Amazon CTA */
.amazon-cta {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
}

.amazon-cta h3 {
    color: var(--dark-text);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.amazon-cta p {
    color: #555;
    margin-bottom: 1.5rem;
}

.amazon-btn {
    display: inline-block;
    background: var(--accent-orange);
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.amazon-btn:hover {
    background: #e68a00;
}

.affiliate-disclosure {
    font-size: 0.85rem;
    color: #666;
    margin-top: 1rem;
}

/* Progress Tracker */
.progress-section {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.progress-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.progress-bar-container {
    background: #e0e0e0;
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    background: linear-gradient(90deg, var(--success-green) 0%, #20c997 100%);
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.progress-text {
    text-align: center;
    color: #555;
    font-size: 0.95rem;
}

/* Main Content */
main {
    padding: 3rem 0;
}

main h2 {
    color: var(--primary-blue);
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
}

main h3 {
    color: var(--primary-blue);
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

main p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

main a {
    color: var(--primary-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-blue);
}

main a:hover {
    opacity: 0.7;
}

/* Image Placeholders */
.image-placeholder {
    background: var(--light-bg);
    border: 2px dashed var(--border-gray);
    padding: 3rem;
    text-align: center;
    color: #999;
    margin: 2rem 0;
    border-radius: 8px;
}

.video-placeholder {
    background: var(--light-bg);
    border: 2px dashed var(--border-gray);
    padding: 4rem 2rem;
    text-align: center;
    color: #999;
    margin: 2rem 0;
    border-radius: 8px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Comments Section */
.comments-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.comments-section h3 {
    margin-bottom: 1.5rem;
}

.comment-form {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.submit-btn {
    background: var(--primary-blue);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #1e4a6f;
}

.comments-list {
    margin-top: 2rem;
}

.comment {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary-blue);
}

.comment.reply {
    margin-left: 3rem;
    border-left-color: #6c757d;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-blue);
}

.comment-date {
    color: #999;
}

.comment-text {
    color: var(--dark-text);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.reply-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.reply-btn:hover {
    opacity: 0.7;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
}

/* Updates/Blog Posts */
.update-post {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.update-post h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.update-date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.update-content {
    line-height: 1.7;
}

.update-content p {
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--dark-text);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

footer .container {
    max-width: 1200px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #ddd;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-amazon-btn {
    display: inline-block;
    background: var(--accent-orange);
    color: white;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.3s;
}

.footer-amazon-btn:hover {
    background: #e68a00;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav a {
    color: #ddd;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 0.7;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.9rem;
}

.affiliate-notice {
    font-size: 0.85rem;
    color: #999;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

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

.logout-btn {
    background: var(--danger-red);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-gray);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--primary-blue);
    background: var(--light-bg);
}

.tab-button.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

.admin-section h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.admin-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-card h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

table th {
    background: var(--light-bg);
    font-weight: 600;
}

table tr:hover {
    background: #f8f9fa;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    margin-right: 0.5rem;
    text-decoration: none;
    display: inline-block;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    header nav {
        margin-top: 1rem;
    }
    
    header nav a {
        margin: 0 10px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .comment.reply {
        margin-left: 1rem;
    }
    
    footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    footer nav a {
        margin: 0 10px;
    }
}