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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    height: calc(100vh - 200px);
}

.poll-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.poll-card.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.poll-card.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.poll-question {
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 15px;
}

.poll-question h2 {
    font-size: 1.8rem;
    font-weight: bold;
}

.poll-results {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 25px;
}

.answer-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.answer-label {
    font-size: 1.3rem;
    font-weight: 600;
}

.bar-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
}

.bar {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.bar-a {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.bar-b {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.vote-count {
    font-size: 1.1rem;
    opacity: 0.9;
}

.poll-date {
    margin-top: auto;
    padding-top: 15px;
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.7;
}

.rotation-indicator {
    text-align: center;
    margin-top: 20px;
    font-size: 1.5rem;
    font-weight: bold;
}

.no-polls {
    text-align: center;
    margin-top: 20vh;
}

.no-polls h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.no-polls p {
    font-size: 1.5rem;
    opacity: 0.8;
}

.nav-link {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.nav-link a {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

.nav-link a:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        height: auto;
    }

    .poll-card {
        min-height: 300px;
    }
}
