* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5em;
}

h2 {
    color: #764ba2;
    margin: 30px 0 20px;
    font-size: 1.8em;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 1.1em;
}

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.question-block {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid #667eea;
}

.question-block h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.options-grid {
    display: grid;
    gap: 10px;
}

.option-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.option-input input {
    flex: 1;
}

.option-input input[type="radio"] {
    width: auto;
    margin-left: 10px;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    margin-right: 10px;
}

button.add-question {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    margin-bottom: 20px;
}

.link-display {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    border: 2px solid #4caf50;
}

.link-display a {
    color: #2e7d32;
    font-size: 1.2em;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.link-display a:hover {
    text-decoration: underline;
}

.participants-list {
    margin-top: 30px;
}

.participant-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s;
}

.participant-card:hover {
    border-color: #667eea;
}

.participant-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
}

.participant-score {
    display: flex;
    gap: 20px;
    align-items: center;
}

.score-badge {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1em;
}

.score-good {
    background: #4caf50;
    color: white;
}

.score-medium {
    background: #ff9800;
    color: white;
}

.score-bad {
    background: #f44336;
    color: white;
}

.timer {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 1.3em;
    font-weight: 600;
    color: #667eea;
    z-index: 1000;
}

.timer.warning {
    color: #f44336;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.quiz-question {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
}

.options {
    display: grid;
    gap: 15px;
}

.option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.option.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}

.progress {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #667eea;
    font-weight: 600;
}

.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin: 30px 0;
}

.result-card h2 {
    color: white;
    margin-bottom: 20px;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background: rgba(255,255,255,0.2);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1.1em;
    opacity: 0.9;
}

.review-question {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.review-question-text {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.review-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #f8f9fa;
    border-right: 4px solid transparent;
}

.review-option.correct {
    background: #e8f5e9;
    border-right-color: #4caf50;
}

.review-option-text {
    flex: 1;
    font-size: 1.05em;
}

.review-option.correct .review-option-text {
    font-weight: 600;
    color: #2e7d32;
}

.review-percentage {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.review-option.correct .review-percentage {
    background: #4caf50;
}

.correct-badge {
    background: #4caf50;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-right: 10px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .timer {
        top: 10px;
        left: 10px;
        padding: 10px 20px;
        font-size: 1.1em;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}