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

html {
    font-size: 16px;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    color: white;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

main {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.poll-header {
    text-align: center;
    margin-bottom: 25px;
}

.poll-header h2 {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.4;
}

.poll-meta {
    color: #888;
    font-size: 0.95em;
}

.poll-meta strong {
    color: #667eea;
    font-size: 1.2em;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.option-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option-card input[type="radio"] {
    display: none;
}

.option-card input[type="radio"]:checked ~ * {
    border-color: #667eea;
}

.option-card input[type="radio"]:checked + .option-content .option-text {
    color: #667eea;
    font-weight: bold;
}

.option-card input[type="radio"]:checked + .option-content .option-icon {
    transform: scale(1.2);
}

/* 选中状态样式 */
.option-card:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.option-card:has(input[type="radio"]:checked) .progress-fill {
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.option-icon {
    font-size: 1.8em;
    transition: transform 0.3s ease;
}

.option-text {
    font-size: 1.15em;
    color: #333;
    transition: color 0.3s ease;
}

.option-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.option-stats .percent {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
}

.option-stats .count {
    font-size: 0.9em;
    color: #888;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.support {
    background: linear-gradient(90deg, #11998e, #38ef7d);
}

.progress-fill.oppose {
    background: linear-gradient(90deg, #eb3349, #f45c43);
}

.progress-fill.neutral {
    background: linear-gradient(90deg, #f093fb, #f5576c);
}

.vote-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.15em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.results-summary {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.results-summary h3 {
    color: #333;
    margin-bottom: 18px;
    font-size: 1.1em;
}

/* 柱状图样式 */
.bar-chart {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.chart-title {
    text-align: center;
    font-size: 1em;
    font-weight: bold;
    color: #555;
    margin-bottom: 20px;
}

.chart-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 180px;
    padding: 10px 0;
    position: relative;
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.bar-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.bar-wrapper {
    position: relative;
    width: 50px;
    height: 120px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.bar {
    width: 100%;
    border-radius: 8px 8px 0 0;
    transition: height 0.6s ease;
    position: relative;
    min-height: 5px;
}

.bar:hover {
    opacity: 0.8;
}

.support-bar {
    background: linear-gradient(180deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 2px 10px rgba(17, 153, 142, 0.4);
}

.oppose-bar {
    background: linear-gradient(180deg, #eb3349 0%, #f45c43 100%);
    box-shadow: 0 2px 10px rgba(235, 51, 73, 0.4);
}

.neutral-bar {
    background: linear-gradient(180deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 10px rgba(240, 147, 251, 0.4);
}

.bar-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.bar:hover .bar-tooltip {
    opacity: 1;
}

.bar-value {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 8px;
    color: #333;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    color: #666;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-color.support {
    background: linear-gradient(180deg, #11998e 0%, #38ef7d 100%);
}

.legend-color.oppose {
    background: linear-gradient(180deg, #eb3349 0%, #f45c43 100%);
}

.legend-color.neutral {
    background: linear-gradient(180deg, #f093fb 0%, #f5576c 100%);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-value.support {
    color: #11998e;
}

.stat-value.oppose {
    color: #eb3349;
}

.stat-value.neutral {
    color: #f093fb;
}

.stat-label {
    font-size: 0.85em;
    color: #888;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #888;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

footer {
    text-align: center;
    margin-top: 25px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9em;
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 15px;
        max-width: 100%;
    }
    
    header h1 {
        font-size: 1.7em;
    }
    
    main {
        padding: 20px;
    }
    
    .poll-header h2 {
        font-size: 1.3em;
    }
    
    .option-card {
        padding: 16px;
    }
    
    .option-icon {
        font-size: 1.6em;
    }
    
    .option-text {
        font-size: 1.1em;
    }
    
    .vote-btn {
        padding: 16px;
        font-size: 1.1em;
    }
    
    .results-summary {
        padding: 15px;
    }
    
    .stats-grid {
        gap: 10px;
    }
    
    .stat-value {
        font-size: 1.6em;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    main {
        padding: 15px;
    }
    
    .option-card {
        padding: 14px;
    }
    
    .vote-btn {
        padding: 14px;
    }
    
    .stats-grid {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px;
        background: white;
        border-radius: 8px;
    }
    
    .stat-value {
        font-size: 1.8em;
    }
}

@media (max-width: 360px) {
    html {
        font-size: 13px;
    }
    
    header h1 {
        font-size: 1.3em;
    }
    
    .option-card {
        padding: 12px;
    }
    
    .option-icon {
        font-size: 1.4em;
    }
}