/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 12px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #007bff;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 60px 24px;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.hero p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

/* General */
body {
    font-family: sans-serif;
    text-align: center;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Content Sections */
.content-section {
    padding: 20px 0;
}

.content-section h2 {
    font-size: 26px;
    color: #333;
    margin-bottom: 8px;
}

.section-desc {
    max-width: 560px;
    margin: 0 auto 20px;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
}

/* Lotto */
#generate-btn {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    margin-bottom: 20px;
}

#generate-btn:hover {
    background-color: #0056b3;
}

#lotto-numbers {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    min-height: 50px;
}

.lotto-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-label {
    min-width: 70px;
    text-align: right;
    font-weight: bold;
    color: #333;
}

.group-balls {
    display: flex;
    gap: 10px;
}

.ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.ball.yellow { background-color: #fbc400; color: black; }
.ball.blue { background-color: #69c8f2; }
.ball.red { background-color: #ff7272; }
.ball.grey { background-color: #aaa; }
.ball.green { background-color: #b0d840; }

.ball.mega {
    width: 48px;
    height: 48px;
    font-size: 20px;
    background: linear-gradient(135deg, #ffcc00, #ff6600);
    border: 3px solid #cc5200;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    box-shadow: 0 0 12px rgba(255, 153, 0, 0.6), 2px 2px 5px rgba(0,0,0,0.2);
}

.separator {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    color: #666;
    padding: 0 2px;
}

/* Section Divider */
.section-divider {
    border: none;
    border-top: 2px dashed #ccc;
    margin: 40px auto;
    width: 60%;
}

/* Lunch Menu Recommendation */
#lunch-btn {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #ff6b35;
    color: white;
    border: none;
    border-radius: 5px;
    margin-bottom: 20px;
}

#lunch-btn:hover {
    background-color: #e55a2b;
}

#lunch-result {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    min-height: 50px;
}

.lunch-card {
    background: white;
    border-radius: 16px;
    padding: 30px 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 300px;
}

.lunch-emoji {
    font-size: 60px;
    margin-bottom: 12px;
}

.lunch-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.lunch-desc {
    font-size: 14px;
    color: #777;
}

.pop-in {
    animation: popIn 0.4s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Review Form */
#review-form {
    max-width: 400px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: left;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #28a745;
}

.form-group textarea {
    resize: vertical;
}

.star-rating {
    display: flex;
    gap: 4px;
    font-size: 32px;
    cursor: pointer;
}

.star-rating .star {
    color: #ddd;
    transition: color 0.15s;
}

.star-rating .star.active {
    color: #fbc400;
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: #fbc400;
}

#review-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.2s;
}

#review-submit-btn:hover {
    background-color: #218838;
}

#review-submit-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

#review-status {
    margin-top: 16px;
    font-size: 16px;
    font-weight: bold;
}

#review-status.success {
    color: #28a745;
}

#review-status.error {
    color: #dc3545;
}

/* Teachable Machine - Dog or Cat */
.tm-subtitle {
    color: #666;
    margin-top: -5px;
    margin-bottom: 16px;
    font-size: 14px;
}

#tm-start-btn {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #6f42c1;
    color: white;
    border: none;
    border-radius: 5px;
    margin-bottom: 20px;
}

#tm-start-btn:hover {
    background-color: #5a32a3;
}

#tm-start-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

#webcam-container {
    display: flex;
    justify-content: center;
    margin: 16px auto;
}

#webcam-container canvas {
    border-radius: 16px;
    border: 4px solid #ccc;
    transition: border-color 0.3s;
}

#webcam-container canvas.tm-border-dog {
    border-color: #007bff;
}

#webcam-container canvas.tm-border-cat {
    border-color: #ff6b35;
}

#label-container {
    max-width: 360px;
    margin: 0 auto 40px;
}

.tm-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
}

.tm-class-name {
    min-width: 50px;
    text-align: right;
    color: #333;
}

.tm-bar-track {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.tm-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6f42c1, #b07aff);
    border-radius: 10px;
    transition: width 0.2s ease;
}

.tm-pct {
    min-width: 40px;
    text-align: left;
    color: #555;
}

#tm-countdown {
    font-size: 64px;
    font-weight: bold;
    color: #6f42c1;
    min-height: 20px;
}

.tm-countdown-active {
    animation: popIn 0.4s ease-out;
}

#tm-result {
    margin: 16px auto;
}

.tm-result-text {
    display: inline-block;
    font-size: 28px;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 12px;
}

.tm-result-text.dog {
    color: #007bff;
    background: #e7f1ff;
}

.tm-result-text.cat {
    color: #ff6b35;
    background: #fff3ee;
}

/* Footer */
.site-footer {
    background: #333;
    color: #ccc;
    padding: 30px 24px;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-copy {
    font-size: 12px;
    color: #777;
    margin: 0;
}

/* Page Content (About, Privacy) */
.page-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 16px;
    text-align: left;
}

.page-content h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 8px;
}

.page-content h2 {
    font-size: 22px;
    color: #333;
    margin-top: 32px;
    margin-bottom: 8px;
}

.page-content h3 {
    font-size: 18px;
    color: #444;
    margin-top: 24px;
    margin-bottom: 6px;
}

.page-content p {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.page-content ul {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    padding-left: 24px;
    margin-bottom: 12px;
}

.page-content a {
    color: #007bff;
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-updated {
    color: #999;
    font-size: 13px;
    margin-bottom: 24px;
}
