/* ========================================
   PHONECARE LUCKY REWARDS PORTAL
======================================== */

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    --bg-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    --border: #e2e8f0;
    --border-focus: #3b82f6;
    
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Header */
.header {
    /* background: var(--bg-gradient); */
    color: var(--text-white);
    background: #624ef9;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    min-height: 18.5vh;
    z-index: 5;
    overflow: visible;
    margin-bottom: -1px;
}

.wheel{
    position: absolute;
    height: 270px;
    width: 270px;
    object-fit: cover;
    z-index: 10;
    top: -65px;
    right: -60px;
}

.headphone{
    position: absolute;
    z-index: 11;
    width: 85px;
    right: -2%;
    top: 55%;
    rotate: 10deg;
}

.smartphone{
    position: absolute;
    z-index: 11;
    width: 95px;
    right: 19%;
    top: 50%;
}

.smartwatch{
    position: absolute;
    z-index: 11;
    width: 70px;
    right: 110px;
    top: -5%;
    rotate: 10deg;
}
.giftbox{
    position: absolute;
    z-index: 11;
    width: 80px;
    right: -4%;
    top: -2%;
    rotate: 15deg;
}

.popper{
    position: absolute;
    background-image: url(vecteezy_golden-confetti-explosion-isolated-on-a-transparent_23204799.png);
    z-index: 1;
    height: 190px;
    width: 600px;
    background-position: center;
    background-size: cover;
    left: -4px;
    top: -2px;
    rotate: 3deg;
    opacity: 30%;
}

.devider{
    content:'';
    font-family:'shape divider from ShapeDividers.com';
    position: absolute;
    /* z-index: 3; */
    pointer-events: none;
    background-repeat: no-repeat;
    bottom: 0;
    /* left: -0.1vw; */
    border: none;
    right: -0.1vw;
    height: 68px;
    width: 100%;
    
    /* Transform to make it overflow from bottom */
    transform: translateY(100%);
    background-size: 174% 68px;
    background-position: 50% 0%;  background-image: url('data:image/svg+xml;charset=utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35.28 2.17" preserveAspectRatio="none"><path d="M0 .5c3.07.55 9.27-.42 16.14 0 6.88.4 13.75.57 19.14-.11V0H0z" fill="%23624ef9"/><path d="M0 1c3.17.8 7.29-.38 10.04-.55 2.75-.17 9.25 1.47 12.67 1.3 3.43-.17 4.65-.84 7.05-.87 2.4-.02 5.52.88 5.52.88V0H0z" opacity=".5" fill="%23624ef9"/><path d="M0 1.85c2.56-.83 7.68-.3 11.79-.42 4.1-.12 6.86-.61 9.58-.28 2.73.33 5.61 1.17 8.61 1 3-.19 4.73-.82 5.3-.84V.1H0z" opacity=".5" fill="%23624ef9"/></svg>'); 
    }
    
    @media (min-width:2100px){
    .devider::before{
    background-size: 174% calc(2vw + 68px);
    }
    }
    

.logo{
    position: absolute;
    top: 24px;
    z-index: 4;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    font-family: "Poppins";
    margin-bottom: 0.25rem;
    letter-spacing: 0.07rem;
    color: #624ef9;
    background: white;
    padding: 0px 12px;
    object-position: center;
    border-radius: 30px 0 30px;
}

.logo h2 {
    font-size: 2.5rem;
    line-height: 34px;
    letter-spacing: 0.07rem;
    background: linear-gradient(
    to right,
    /* #695a36 0%,
    #f0b762 22%, */
    #f6d37a 45%,
    #f6f2c0 50%,
    #f6e27a 55%,
    #f6c27a 78%,
    #f2d061 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
    opacity: 100%;
    margin-top: 12px;
    font-family: "Rowdies", sans-serif;
}

.user-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.user-info p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.mystery-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.mystery-box span {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.mystery-box p {
    font-size: 0.875rem;
    margin: 0;
}

/* Landing Page */
.welcome-section {
    padding: 2rem 1.5rem 1rem;
    text-align: center;
    margin-top: 45px;
}

.welcome-section h2 {
    font-size: 1.5rem;
    font-weight: 900;
    font-family: "Poppins";
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Form Section */
.form-section {
    padding: 0 1.5rem 2rem;
}

.customer-form {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin-left: 3px;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

.input-group input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    /* background: var(--bg-gradient); */
    background: linear-gradient(45deg, #F9C23C, #FFD700, #c6920e, #DAA520);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-accent);
    color: var(--text-primary);
}

.btn-game {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-game:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Instructions */
.instructions {
    padding: 2rem 1.5rem;
    background: var(--bg-accent);
}

.instructions h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.instruction-cards {
    display: grid;
    gap: 1rem;
}

.instruction-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.instruction-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.instruction-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.instruction-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Game Selection */
.game-selection-page {
    min-height: 100vh;
}

.games-grid {
    padding: 2rem 1.5rem;
    display: grid;
    gap: 1.5rem;
    margin-top: 45px;
}

.game-card:nth-child(2),
.game-card:nth-child(3){
    display: none !important;
}

.game-card {
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.game-content{
    display: flex;
    flex-direction: column;
    align-items: start;
    text-align: start;
    font-family: "Poppins";
    width: 70%;
}

.game-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.game-icon {
    width: 25%;
    object-fit: cover;
    margin-bottom: 1rem;
    display: block;
}

.game-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    /* margin-bottom: 0.2rem; */
    color: var(--text-primary);
}

.game-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.back-section {
    padding: 1rem 1.5rem 2rem;
    text-align: center;
}

.wishes{
    width: 100%;
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 0;
    margin-bottom: 55px;
}

.wishes h3{
    font-family: "Rowdies", sans-serif;
    font-size: 1.5rem;
    opacity: 50%;
}

/* Error Message */
.error-message {
    background: #fee2e2;
    color: var(--danger);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: 0.875rem;
    text-align: center;
    border: 1px solid #fecaca;
    display: none; /* Hide by default */
}

.error-message:not(:empty) {
  display: block; /* Show when it has content */
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid var(--text-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--text-white);
    margin-top: 1rem;
    font-weight: 500;
}

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    color: var(--text-white);
    font-weight: 500;
    z-index: 1500;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

.notification.info {
    background: var(--primary);
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .header {
        padding: 1.5rem 1rem;
    }
    
    .welcome-section,
    .form-section,
    .instructions,
    .games-grid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .customer-form {
        padding: 1.5rem;
    }
    
    .instruction-cards {
        gap: 0.75rem;
    }
    
    .instruction-card {
        padding: 1rem;
    }
    
    .game-card {
        padding: 1.5rem;
    }
    
    .games-grid {
        gap: 1rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
