@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* 1. Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Allow footer to sit below container */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 2. Main Layout & Background */
.background-shapes {
    position: fixed; /* Use fixed to ensure it stays in background */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}
.shape:nth-child(1) { top: 10%; left: 10%; width: 100px; height: 100px; animation-duration: 25s; }
.shape:nth-child(2) { top: 20%; left: 80%; width: 60px; height: 60px; animation-duration: 18s; }
.shape:nth-child(3) { top: 70%; left: 15%; width: 80px; height: 80px; animation-duration: 22s; }
.shape:nth-child(4) { top: 80%; left: 70%; width: 120px; height: 120px; animation-duration: 30s; }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-1000px) rotate(720deg); }
}

.container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 600px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 20px;
}

/* 3. Navigation (Tabs & Footer) */
.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}
.tab-link {
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    color: #aaa;
    transition: color 0.3s ease;
    border-bottom: 2px solid transparent; /* Add for smooth transition */
}
.tab-link.active {
    color: #66a6ff;
    border-bottom-color: #66a6ff;
}

.site-footer {
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}
.site-footer nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
}
.site-footer nav a:hover {
    text-decoration: underline;
}
.site-footer p {
    margin-top: 10px;
    color: #eee;
    font-size: 0.9em;
}

/* 4. Tab Content & Shared Styles */
.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tab-content h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 15px;
}

.tool-description {
    font-size: 1.05em;
    color: #555;
    margin: -10px auto 25px auto;
    max-width: 90%;
    line-height: 1.6;
}

/* 5. Lotto Tab Styles */
#lotto h1 {
    color: #333;
}
.lotto-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
}
.lotto-ball {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 600;
    color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    transform: scale(0);
}
.lotto-ball.bonus {
    margin-left: 20px;
}
.lotto-ball.empty {
    background: #e0e0e0;
    color: #999;
    transform: scale(1);
}
.plus-icon {
    font-size: 30px;
    color: #aaa;
}
.generate-btn {
    background: linear-gradient(135deg, #66a6ff 0%, #89f7fe 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 166, 255, 0.5);
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 166, 255, 0.7);
}
.message {
    margin-top: 25px;
    color: #555;
    font-size: 16px;
    height: 20px;
}

/* 6. Analyzer Tab Styles */
#analyzer h1 {
    color: #6a0572;
}
.upload-container {
    margin: 20px auto;
    width: 200px;
}
.upload-label {
    cursor: pointer;
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 200px;
    height: 200px;
    margin: 0 auto;
}
.upload-label span {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.5);
    color: white;
    text-align: center;
    padding: 10px 0;
    font-weight: 600;
    box-sizing: border-box;
}
#image-upload {
    display: none;
}
#image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#analyzer .start-button {
    background: linear-gradient(45deg, #f5576c 0%, #f093fb 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(245, 87, 108, 0.4);
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    outline: none;
}
#analyzer .start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(245, 87, 108, 0.6);
}
.result-display {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    display: none;
}
.result-display.show {
    display: block;
}
.prediction-text {
    font-size: 1.5em;
    font-weight: 700;
    color: #6a0572;
    margin-bottom: 15px;
}
.prediction-bar-container {
    display: flex;
    width: 100%;
    height: 25px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #eee;
    margin-top: 20px;
}
.prediction-bar {
    height: 100%;
    transition: width 0.5s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
}
.dog-bar {
    background: linear-gradient(45deg, #ffe080 0%, #ffc04d 100%);
}
.cat-bar {
    background: linear-gradient(45deg, #b388ff 0%, #809fff 100%);
}
.confidence-text {
    font-size: 1em;
    color: #777;
    margin-top: 10px;
}

/* 7. Other Pages (About, Contact, Privacy) */
.page-content {
    text-align: left;
    line-height: 1.8;
    color: #333;
}
.page-content h1 {
    font-size: 2.2em;
    margin-bottom: 15px;
}
.page-content h2 {
    margin-top: 20px;
    margin-bottom: 10px;
}
.page-content ul {
    list-style-position: inside;
    padding-left: 20px;
}
.page-content a {
    color: #66a6ff;
    text-decoration: none;
}
.page-content a:hover {
    text-decoration: underline;
}

.contact-form {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid #d8def0;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    background: rgba(255, 255, 255, 0.95);
    color: #25324d;
    outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #66a6ff;
    box-shadow: 0 0 0 3px rgba(102, 166, 255, 0.2);
}
.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}
.submit-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #5e8fff 0%, #7fd8ff 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 14px rgba(94, 143, 255, 0.35);
}
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(94, 143, 255, 0.45);
}
.form-status {
    min-height: 1.2em;
    font-size: 0.9rem;
    color: #42526f;
}

#empty-state-preview {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed #66a6ff;
    border-radius: 10px;
    background-color: rgba(230, 240, 255, 0.5);
    color: #66a6ff;
    font-weight: 600;
}
#empty-state-preview svg {
    margin-bottom: 10px;
}
.upload-label span {
    display: none; /* Hide the old span */
}

