:root {
    --primary: #6366f1;
    --secondary: #ec4899;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--primary);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: var(--secondary);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease-out;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    color: #cbd5e1;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 15px 0;
}

header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.phone-input-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease-out;
}

#phone {
    width: 100%;
    max-width: 450px;
    padding: 18px 30px;
    font-size: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.03);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit;
}

#phone::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#phone:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.item-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    animation: fadeIn 1s ease-out both;
}

.item-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.item-img-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.item-card:hover .item-img {
    transform: scale(1.05);
}

.item-info {
    padding: 25px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.vote-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.vote-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--secondary);
}

.vote-btn:hover::after {
    left: 100%;
}

.loading {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
    padding: 40px;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === Nav Link === */
.nav-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* === Live Results Dashboard Styles === */
.live-badge {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #fca5a5 !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    animation: fadeIn 1s ease-out both;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.5);
    background: rgba(40, 55, 75, 0.9);
    border-color: rgba(99, 102, 241, 0.4);
}

.result-img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.1);
}

.result-details {
    width: 100%;
    text-align: center;
}

.result-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.result-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.votes-count {
    font-size: 0.95rem;
    color: white;
    font-weight: 600;
}

.votes-percent {
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 800;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    border-radius: 6px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    .item-img-wrapper {
        height: 250px;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
