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

:root {
    --primary-blue: #003366;
    --secondary-blue: #1e4d8c;
    --accent-red: #c02425;
    --gold: #f1c40f;
    --gold-gradient: linear-gradient(90deg, #d4af37 0%, #f1c40f 50%, #d4af37 100%);
    --bg-light: #f8fbff;
    --text-dark: #333;
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #eee;
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-x: hidden;
}

.webview-container {
    width: 100%;
    max-width: 575px;
    background-image: url('image/winner-banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.webview-container .header {
    text-align: center;
    margin-bottom: 25px;
    animation: fadeInDown 0.8s ease-out;
}



.curved-title {
    width: 100%;
    margin-top: -20px;
    margin-bottom: 0px;
}

.curved-title svg {
    width: 100%;
    height: auto;
}

.title-svg-text {
    font-family: 'Outfit', sans-serif;
    font-size: 52px;
    font-weight: 800;
    fill: url(#textGradient);
    text-transform: uppercase;
}

/* Add gradient to SVG in winner.html or via CSS if supported (SVG needs defs) */

.profile-card {
    position: relative;
    background: var(--card-bg);
    border: 2px solid #add8e6;
    border-radius: 20px;
    width: 90%;
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
    animation: slideInLeft 0.8s ease-out;
}

.profile-img-container {
    position: absolute;
    width: 140px;
    height: 140px;
    background: #fff;
    border-radius: 50%;
    overflow: hidden;
    padding: 0px;
    border: 3px solid #f1c40f;
    flex-shrink: 0;
    left: -20px;
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    margin-left: 100px;
    text-align: center;
    flex-grow: 1;
}

.profile-info h2 {
    font-size: 35px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.profile-info p {
    font-size: 16px;
    color: #555;
    line-height: 1.2;
}

.winner-banner {
    width: 92%;
    background: linear-gradient(90deg, #1e4d8c, #3a7bd5);
    border-radius: 20px;
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    position: relative;
    margin-bottom: 35px;
    animation: zoomIn 0.8s ease-out;
    margin-top: 15px;
}

.badge-icon {
    width: 120px;
    position: absolute;
    left: -31px;
    top: -19px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.winner-label {
    margin-left: 100px;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    flex-grow: 1;
}

.points-display {
    color: #fff;
    text-align: right;
    margin-right: 20px;
}

.points-label {
    font-size: 14px;
    display: block;
    opacity: 0.9;
}

.points-value {
    font-size: 25px;
    font-weight: 700;
}

.rank-grid-container {
    background: rgba(220, 235, 255, 0.7);
    border: 1px solid #cedfed;
    border-radius: 15px;
    padding: 15px;
    width: 100%;
    margin-bottom: 20px;
    backdrop-filter: blur(3px);
}

.congrats-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin-bottom: 10px;
    text-align: center;
}

.rank-grid-container h3 {
    color: var(--primary-blue);
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 700;
}

.grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.grid-item:hover {
    transform: translateY(-5px);
}

.month-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.cert-container {
    position: relative;
    width: 45px;
    height: 60px;
}

.cert-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rank-badge {
    position: absolute;
    bottom: -5px;
    right: -2px;
    width: 25px;
    z-index: 2;
}

.subscription-section {
    text-align: center;
    width: 100%;
    margin-top: -5px;
    position: relative;
}

.gift-icon {
    width: 130px;
    margin-bottom: -20px;
    animation: bounce 2s infinite ease-in-out;

}

.sub-banner {
    background: var(--gold-gradient);
    color: #fff;
    padding: 15px 20px;
    border-radius: 20px 0 20px 0px;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: inline-block;
    width: 90%;
    margin-bottom: 40px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .winner-label {
        font-size: 28px;
        margin-left: 90px;
    }

    .title-text {
        font-size: 30px;
    }
}

@media (max-width: 400px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .profile-img-container {
        width: 100px;
        height: 100px;
    }

    .profile-info h2 {
        font-size: 22px;
    }

    .winner-label {
        font-size: 30px;
        margin-left: 40px;
    }

    .profile-info {
        margin-left: 70px;
    }

    .badge-icon {
        width: 80px;
    }

    .profile-info p {
        font-size: 13px;
    }

    .points-value {
        font-size: 20px;
        font-weight: 700;
    }

    .winner-banner {
        width: 92%;
        border-radius: 15px;
        height: 60px;
    }

    .badge-icon {
        width: 80px;
        position: absolute;
        left: -31px;
        top: -10px;
    }

    .sub-banner {
        font-size: 19px;
    }

    .gift-icon {
        width: 110px;
    }
}