:root {
    --primary: #2563eb;
    --secondary: #7c3aed;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
}

* {
    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;
    overflow-x: hidden;
    background-attachment: fixed;
}

.page-container {
    display: none;
    min-height: 100vh;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease-out;
}

.page-container.active {
    display: block;
}

.start-content {
    animation: fadeInUp 0.8s ease-out;
}

.rotating-cog {
    font-size: 6rem;
    color: white;
    animation: rotate 4s linear infinite;
    display: block;
    margin-bottom: 30px;
}

.start-content h1 {
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.info-card {
    background: white;
    border-radius: 30px;
    padding: 40px;
    margin: 40px auto;
    max-width: 700px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: scaleIn 0.6s ease-out 0.3s backwards;
}

.cnc-gif {
    width: 100%;
    max-width: 400px;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.features {
    text-align: left;
    margin: 30px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    font-size: 1.1rem;
}

.feature-item i {
    color: var(--success);
    font-size: 1.5rem;
    margin-right: 15px;
}

.btn-start {
    background: linear-gradient(135deg, var(--success), #059669);
    border: none;
    color: white;
    padding: 20px 60px;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

.btn-start:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
}

.progress-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.4s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.timer {
    position: fixed;
    top: 30px;
    right: 30px;
    background: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    z-index: 1000;
}

.timer i {
    color: var(--primary);
    margin-right: 10px;
}

.question-wrapper {
    position: relative;
    min-height: 500px;
}

.question-slide {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.question-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    position: relative;
}

.question-slide.prev {
    transform: translateX(-100px);
}

.question-card {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.question-header {
    text-align: center;
    margin-bottom: 30px;
}

.question-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.question-image {
    width: 100%;
    max-width: 400px;
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 30px;
    text-align: center;
}

.options-container {
    margin-top: 30px;
}

.option-label {
    display: block;
    padding: 18px 25px;
    margin-bottom: 15px;
    background: var(--light);
    border: 3px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.option-label:hover {
    background: #e0e7ff;
    border-color: var(--primary);
    transform: translateX(10px);
}

.option-label.selected {
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    border-color: var(--primary);
    font-weight: 600;
}

.option-label input {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.drag-drop-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.drag-section h4 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark);
    font-weight: 700;
}

.drag-items, .drop-zones {
    background: var(--light);
    padding: 25px;
    border-radius: 15px;
    min-height: 300px;
}

.drag-item {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px 25px;
    margin-bottom: 15px;
    border-radius: 12px;
    cursor: move;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.drag-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.drag-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.drop-zone {
    min-height: 70px;
    border: 3px dashed #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
}

.drop-zone-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 600;
}

.drop-zone.drag-over {
    background: #e0e7ff;
    border-color: var(--primary);
    border-style: solid;
}

.drop-zone .dropped-item {
    background: var(--success);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.slider-container {
    padding: 40px 30px;
    text-align: center;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #ef4444, #fbbf24, #10b981);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.slider-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 25px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #64748b;
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
}

.btn-nav {
    flex: 1;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-prev {
    background: #e2e8f0;
    color: var(--dark);
}

.btn-prev:hover {
    background: #cbd5e1;
    transform: translateX(-5px);
}

.btn-next {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-next:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4);
}

.btn-submit {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

.result-content {
    animation: zoomIn 0.6s ease-out;
}

.result-icon {
    font-size: 8rem;
    margin-bottom: 30px;
    animation: bounce 1s infinite;
}

.result-score {
    font-size: 6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 20px 0;
}

.result-percentage {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
}

.result-message {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 40px;
    font-weight: 600;
}

.result-details {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 30px auto;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 2px solid var(--light);
    font-size: 1.2rem;
}

.detail-item:last-child {
    border-bottom: none;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-restart, .btn-home {
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-restart {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-restart:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5);
}

.btn-home {
    background: white;
    color: var(--dark);
}

.btn-home:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@media (max-width: 768px) {
    .drag-drop-container {
        grid-template-columns: 1fr;
    }
    
    .timer {
        top: 10px;
        right: 10px;
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .result-score {
        font-size: 4rem;
    }
    
    .cnc-gif {
        height: 200px;
    }
    
    .question-card {
        padding: 25px;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .option-label {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .btn-nav {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .header h1, .start-content h1 {
        font-size: 2rem;
    }
    
    .info-card {
        padding: 25px;
    }
    
    .btn-start {
        padding: 15px 40px;
        font-size: 1.2rem;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .slider-value {
        font-size: 2rem;
    }
    
    .result-icon {
        font-size: 5rem;
    }
    
    .rotating-cog {
        font-size: 4rem;
    }
    
    .result-message {
        font-size: 1.3rem;
    }
}

.result-time-display {
    color: white;
    font-size: 1.5rem;
    margin: 20px 0;
    font-weight: 600;
}

.result-time-display i {
    color: #fbbf24;
    margin-right: 10px;
}

.result-time-display span {
    font-weight: 700;
    color: #fbbf24;
}

.rating-container {
    padding: 40px 30px;
    text-align: center;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.star {
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.4;
}

.star:hover,
.star.hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.2);
}

.star.selected {
    filter: grayscale(0%);
    opacity: 1;
    animation: starPop 0.3s ease;
}

@keyframes starPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.rating-labels {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.rating-label {
    padding: 10px 15px;
    background: var(--light);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--dark);
}

.sorting-container {
    padding: 20px;
    background: var(--light);
    border-radius: 15px;
    min-height: 300px;
}

.sort-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 15px;
    cursor: move;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 500;
}

.sort-item:hover {
    border-color: var(--primary);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.sort-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.sort-handle {
    font-size: 1.5rem;
    margin-right: 15px;
    color: #94a3b8;
}

.input-container {
    padding: 40px 30px;
    text-align: center;
}

.text-input {
    width: 100%;
    max-width: 400px;
    padding: 18px 25px;
    font-size: 1.3rem;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: scale(1.02);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
}

.image-option {
    cursor: pointer;
}

.image-option input {
    display: none;
}

.image-box {
    background: var(--light);
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.image-option:hover .image-box {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.image-option.selected .image-box {
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.emoji {
    font-size: 4rem;
    margin-bottom: 15px;
}

.image-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

@media (max-width: 768px) {
    .rating-stars {
        gap: 10px;
    }
    
    .star {
        font-size: 2rem;
    }
    
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .emoji {
        font-size: 3rem;
    }
    
    .text-input {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .star {
        font-size: 1.8rem;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .sort-item {
        font-size: 1rem;
        padding: 15px;
    }
}

/*rez*/
.rezultati-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
    margin: 0;
}

.rezultati-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.rezultati-container h1 {
    color: #1e293b;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.rezultati-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.rezultati-stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.rezultati-stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.rezultati-stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

.rezultati-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.rezultati-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 700;
}

.rezultati-table td {
    padding: 15px;
    border-bottom: 2px solid #f8fafc;
}

.rezultati-table tr:hover {
    background: #f8fafc;
}

.rezultati-score-excellent { 
    color: #10b981; 
    font-weight: 700; 
}

.rezultati-score-good { 
    color: #3b82f6; 
    font-weight: 700; 
}

.rezultati-score-ok { 
    color: #f59e0b; 
    font-weight: 700; 
}

.rezultati-score-low { 
    color: #ef4444; 
    font-weight: 700; 
}

.rezultati-btn-back {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.rezultati-btn-back:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.rezultati-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .rezultati-table {
        font-size: 0.9rem;
    }
    
    .rezultati-table th, 
    .rezultati-table td {
        padding: 10px;
    }
    
    .rezultati-container h1 {
        font-size: 2rem;
    }
}