/* style.css - Clean, premium stylesheet for Matka Expert app & Admin Panel */

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

:root {
    --bg-color: #f7f9fc;
    --text-color: #1a1a1a;
    --primary-purple: #3f51b5;
    --primary-purple-hover: #303f9f;
    --primary-green: #00e676;
    --primary-green-hover: #00c853;
    --primary-pink: #e040fb;
    --primary-pink-hover: #d500f9;
    --white: #ffffff;
    --gray-light: #f1f3f5;
    --gray-medium: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --border-radius: 12px;
    --btn-radius: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #e5e5e5;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* Mobile-first main container */
.app-container {
    background-color: var(--white);
    width: 100%;
    max-width: 480px; /* Simulated mobile view */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    overflow-x: hidden;
    padding-bottom: 80px; /* Space for disclaimer and safety padding */
}

/* Header Area */
header {
    background: var(--white);
    padding: 18px 12px;
    text-align: center;
    border-bottom: 1px solid var(--gray-light);
}

.header-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* Marquee / Scrolling Banner */
.marquee-container {
    background-color: #ffeb3b; /* Bright amber/yellow */
    color: #000000;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 2px solid #fbc02d;
    display: flex;
    align-items: center;
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 18s linear infinite;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Button Section */
.button-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

/* App Buttons */
.app-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--btn-radius);
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.app-btn:active {
    transform: scale(0.96);
    box-shadow: none;
}

/* Button Colors */
.app-btn.pink {
    background-color: var(--primary-pink);
    color: var(--white);
}
.app-btn.pink:hover {
    background-color: var(--primary-pink-hover);
}

.app-btn.purple {
    background-color: var(--primary-purple);
    color: var(--white);
}
.app-btn.purple:hover {
    background-color: var(--primary-purple-hover);
}

.app-btn.green {
    background-color: var(--primary-green);
    color: #000000;
}
.app-btn.green:hover {
    background-color: var(--primary-green-hover);
}

/* Floating Contact Actions */
.floating-actions {
    position: fixed;
    bottom: 85px; /* Floating above the navigation or screen bottom */
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none; /* Make container click-through */
    z-index: 999;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    pointer-events: auto; /* Enable clicks on buttons */
    text-decoration: none;
    transition: transform 0.2s ease;
    position: relative;
}

.float-btn:active {
    transform: scale(0.9);
}

.float-btn.whatsapp {
    background-color: #25d366;
}

.float-btn.phone {
    background-color: #ffffff;
    border: 2px solid var(--primary-purple);
}

.float-btn svg {
    width: 32px;
    height: 32px;
}

/* Pulsing effect for attention */
.float-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.4;
}

.float-btn.whatsapp::after {
    border: 2px solid #25d366;
    animation: pulse-green 2s infinite;
}

.float-btn.phone::after {
    border: 2px solid var(--primary-purple);
    animation: pulse-purple 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes pulse-purple {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Footer & Disclaimer */
footer {
    padding: 20px;
    background: #fafafa;
    border-top: 1px solid var(--gray-light);
    text-align: justify;
}

.disclaimer-text {
    font-size: 0.75rem;
    line-height: 1.5;
    color: #495057;
    font-weight: 600;
}

/* Custom Content / Results Page */
.content-wrapper {
    padding: 20px;
    flex-grow: 1;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-purple);
    font-weight: 700;
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.back-btn:hover {
    transform: translateX(-4px);
}

.content-body {
    line-height: 1.6;
}

.content-body h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-color);
    text-transform: uppercase;
    border-left: 4px solid var(--primary-purple);
    padding-left: 8px;
}

.content-body p {
    margin-bottom: 15px;
    color: #495057;
}

/* Custom table inside results */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.results-table th, .results-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid var(--gray-medium);
}

.results-table th {
    background-color: var(--primary-purple);
    color: var(--white);
    font-weight: 700;
}

.results-table tr:nth-child(even) {
    background-color: var(--gray-light);
}

.results-table td.highlight {
    font-weight: 800;
    color: var(--primary-pink);
}

/* ------------------------------------------------------------- */
/* Admin Panel Styles */
/* ------------------------------------------------------------- */

.admin-body {
    background-color: #f0f2f5;
    color: #333;
    display: block;
    width: 100%;
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, var(--primary-purple), #5c6bc0);
    color: var(--white);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.admin-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
}

.admin-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

@media(max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-sidebar {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-nav-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: none;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.admin-nav-btn:hover, .admin-nav-btn.active {
    background-color: var(--gray-light);
    color: var(--primary-purple);
}

.admin-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

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

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--gray-medium);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary-purple);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn-primary {
    background-color: var(--primary-purple);
    color: var(--white);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-purple-hover);
}

.logout-btn {
    background: none;
    border: 1.5px solid rgba(255,255,255,0.7);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: var(--white);
    color: var(--primary-purple);
}

/* Alert Boxes */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

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

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

/* Login Card */
.login-card {
    max-width: 400px;
    width: 100%;
    background: var(--white);
    padding: 35px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin: 100px auto;
}

.login-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--primary-purple);
}

/* Admin buttons management table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.admin-table th {
    font-weight: 700;
    color: #495057;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.pink { background-color: #fbe9e7; color: var(--primary-pink); }
.badge.purple { background-color: #e8eaf6; color: var(--primary-purple); }
.badge.green { background-color: #e8f5e9; color: var(--primary-green-hover); }

.badge-action {
    background-color: #e2e8f0;
    color: #4a5568;
}

.action-links a {
    color: var(--primary-purple);
    font-weight: 700;
    text-decoration: none;
    margin-right: 15px;
}

.action-links a:hover {
    text-decoration: underline;
}

/* Guessing Game Card Layout */
.guessing-card {
    background-color: #ffd600; /* Vibrant yellow */
    color: #000000;
    border-radius: 12px;
    padding: 30px 20px;
    margin: 15px 0;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    font-weight: 700;
    text-transform: uppercase;
}

/* Floating refresh badge in top right of card */
.guessing-card .refresh-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.guessing-card .refresh-badge svg {
    width: 28px;
    height: 28px;
}

.guessing-card .card-datetime {
    font-size: 0.95rem;
    margin-bottom: 25px;
    font-weight: 800;
    display: block;
}

.guessing-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 15px 0;
    letter-spacing: 0.5px;
}

.guessing-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 10px 0 25px 0;
}

.guessing-card-section {
    margin-bottom: 25px;
}

.guessing-card-section h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.guessing-card-section p {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
    color: #000000;
}

.guessing-card-section .divider-digits {
    font-size: 1.6rem;
    font-weight: 800;
}

.guessing-card-section .jodi-list, .guessing-card-section .penal-list {
    line-height: 1.4;
    font-size: 1.5rem;
}

/* Responsive YouTube Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
    margin: 15px 0;
    box-shadow: var(--shadow-md);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Animating Background Color Button (Pink - Sky Blue - White) */
.app-btn.animating-colors {
    animation: bg-color-loop 4s ease-in-out infinite;
    border: 1px solid transparent;
}

@keyframes bg-color-loop {
    0%, 100% {
        background-color: var(--primary-pink); /* Pink */
        color: var(--white);
    }
    33% {
        background-color: #00b0ff; /* Sky Blue */
        color: var(--white);
    }
    66% {
        background-color: var(--white); /* White */
        color: #1a1a1a; /* Dark text for readability */
        border-color: var(--gray-medium);
    }
}/* Video Card style matches user screen */
.video-card {
    background-color: var(--white);
    border-bottom: 1.5px solid var(--gray-medium);
    padding-bottom: 15px;
    margin-bottom: 25px;
}
.video-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 8px 0 4px 0;
    text-align: left;
    text-transform: none;
}
.video-card span {
    font-size: 0.85rem;
    color: #666;
    display: block;
    text-align: left;
    font-weight: 600;
}
