/* Raiffeisen Fonts */
@font-face {
    font-family: 'Amalia';
    src: url('/assets/fonts/AmaliaW05-Regular.C_BgSpFZ.woff2') format('woff2'),
         url('/assets/fonts/AmaliaW05-Regular.C_BgSpFZ.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Amalia';
    src: url('/assets/fonts/AmaliaW05-Medium.g7pZLoJ-.woff2') format('woff2'),
         url('/assets/fonts/AmaliaW05-Medium.g7pZLoJ-.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Amalia';
    src: url('/assets/fonts/AmaliaW05-Bold.i3L6LgXS.woff2') format('woff2'),
         url('/assets/fonts/AmaliaW05-Bold.i3L6LgXS.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

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

body {
    font-family: 'Amalia', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000000;
    min-height: 100vh;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Landing Page Styles */
.landing-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.landing-card {
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.landing-card h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.subtitle {
    color: #666;
    margin-bottom: 40px;
    font-size: 16px;
}

.code-input-group {
    margin-bottom: 25px;
}

.code-input-group input {
    width: 100%;
    padding: 18px 20px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    letter-spacing: 8px;
    font-weight: 700;
    transition: border-color 0.2s;
}

.code-input-group input:focus {
    outline: none;
    border-color: #FEDB00;
}

.btn-join {
    width: 100%;
    padding: 16px;
    background: #FEDB00;
    color: #000000;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 219, 0, 0.4);
}

.btn-join:active {
    transform: translateY(0);
}

.error-message {
    margin-top: 20px;
    padding: 12px;
    background: #fee;
    color: #c33;
    border-radius: 8px;
    font-size: 14px;
}

/* Live View Styles */
.live-container {
    position: relative;
    min-height: 100vh;
}

.live-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 10;
}

.live-header img.header-logo {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

.live-header .header-text {
    flex: 1;
}

.live-header h1 {
    font-size: 20px;
    color: #333;
}

.live-header .event-code {
    font-size: 14px;
    color: #FEDB00;
    font-weight: 700;
    letter-spacing: 2px;
}

.live-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: calc(70px + 20px);
}

.content-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .content-card {
        padding: 30px 20px;
        border-radius: 12px;
    }
}

/* Waiting State */
.waiting-state {
    text-align: center;
    padding: 60px 20px;
}

.waiting-state .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FEDB00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.waiting-state h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.waiting-state p {
    color: #666;
    font-size: 16px;
}

/* Question Display */
.question-container {
    margin-bottom: 30px;
}

.question-container h2 {
    font-size: 26px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Voting Options */
.options-list {
    margin: 30px 0;
}

.option-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.option-item:hover {
    border-color: #FEDB00;
    background: #FFFDF0;
}

.option-item.selected {
    border-color: #FEDB00;
    background: #FFFADC;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-item label {
    flex: 1;
    cursor: pointer;
    font-size: 16px;
}

/* Rating Input */
.rating-input {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.star {
    font-size: 48px;
    cursor: pointer;
    color: #ddd;
    transition: all 0.2s;
}

.star.active,
.star:hover {
    color: #ffd700;
}

/* Rating Scale Input */
.rating-scale-input {
    margin: 30px 0;
    padding: 20px 0;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    gap: 10px;
}

.scale-label-min,
.scale-label-max {
    flex: 0 0 auto;
    max-width: 45%;
    line-height: 1.3;
}

.scale-label-min {
    text-align: left;
}

.scale-label-max {
    text-align: right;
}

.scale-range-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    padding: 0 5px;
}

.scale-range-container input[type="range"] {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.scale-range-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FEDB00;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.scale-range-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(254, 219, 0, 0.5);
}

.scale-range-container input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

.scale-range-container input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FEDB00;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.scale-range-container input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(254, 219, 0, 0.5);
}

.scale-range-container input[type="range"]::-moz-range-thumb:active {
    transform: scale(1.05);
}

.scale-value-min,
.scale-value-max {
    font-weight: bold;
    font-size: 18px;
    color: #333;
    min-width: 35px;
    text-align: center;
}

.scale-current-value {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.scale-current-value strong {
    font-size: 48px;
    color: #333;
    font-weight: 700;
    display: block;
    line-height: 1;
}

/* Mobile Responsive Adjustments for Rating Scale */
@media (max-width: 768px) {
    .rating-scale-input {
        margin: 20px 0;
        padding: 10px 0;
    }

    .scale-labels {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .scale-range-container {
        gap: 10px;
        margin: 20px 0;
    }

    .scale-range-container input[type="range"] {
        height: 8px;
    }

    .scale-range-container input[type="range"]::-webkit-slider-thumb {
        width: 32px;
        height: 32px;
    }

    .scale-range-container input[type="range"]::-moz-range-thumb {
        width: 32px;
        height: 32px;
    }

    .scale-value-min,
    .scale-value-max {
        font-size: 16px;
        min-width: 30px;
    }

    .scale-current-value {
        margin-top: 15px;
        padding: 12px;
    }

    .scale-current-value strong {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .scale-labels {
        font-size: 12px;
    }

    .scale-range-container {
        gap: 8px;
    }

    .scale-value-min,
    .scale-value-max {
        font-size: 14px;
        min-width: 25px;
    }

    .scale-current-value strong {
        font-size: 36px;
    }
}

/* Text Input */
.text-input {
    margin: 30px 0;
}

.text-input textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.text-input textarea:focus {
    outline: none;
    border-color: #FEDB00;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Vote Confirmation */
.vote-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.vote-confirmation .checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 48px;
}

.vote-confirmation h3 {
    font-size: 24px;
    color: #28a745;
    margin-bottom: 10px;
}

.vote-confirmation p {
    color: #666;
    font-size: 16px;
}

/* Vote Count Display */
.vote-count {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}

.vote-count .count {
    font-size: 48px;
    font-weight: 700;
    color: #FEDB00;
    margin-bottom: 10px;
}

.vote-count .label {
    color: #666;
    font-size: 16px;
}

/* Results Display */
.results-container {
    margin-top: 30px;
}

.results-container h3 {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
}

.result-item {
    margin-bottom: 20px;
}

.result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 15px;
}

.result-label .option-name {
    font-weight: 500;
}

.result-label .option-count {
    color: #000000;
    font-weight: 700;
}

.result-bar {
    height: 40px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.result-bar-fill {
    height: 100%;
    background: #FEDB00;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #000000;
    font-weight: 700;
    font-size: 14px;
}

/* Text Responses */
.text-responses {
    max-height: 400px;
    overflow-y: auto;
}

.text-response-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.5;
}

/* Presenter View Styles */
.presenter-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.presenter-header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.presenter-header .header-logo {
    height: 60px;
    width: auto;
}

.presenter-header h1 {
    font-size: 32px;
    margin: 0;
    color: #333;
    font-weight: 600;
}

.presenter-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

/* Presenter Waiting State */
.waiting-display {
    text-align: center;
    max-width: 600px;
}

.waiting-display .qr-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.waiting-display .qr-code {
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.waiting-display .access-info {
    margin-top: 30px;
}

.waiting-display .access-url {
    font-size: 32px;
    color: #FFFFFF;
    margin-top: 20px;
    font-weight: 600;
}

/* Presenter Question Display */
.question-display {
    background: white;
    color: #333;
    padding: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 1200px;
}

.question-display h2 {
    font-size: 48px;
    margin: 0 0 40px 0;
    color: #333;
    text-align: center;
    font-weight: 600;
}

.vote-count-display {
    text-align: center;
    margin-top: 40px;
}

.vote-count-number {
    font-size: 96px;
    font-weight: 700;
    color: #FECC00;
    margin-bottom: 10px;
}

.vote-count-label {
    font-size: 24px;
    color: #666;
}

/* Presenter Results Display */
.results-display {
    width: 100%;
    margin-top: 40px;
}

.results-display .result-item {
    margin-bottom: 30px;
}

.results-display .result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 500;
}

.results-display .result-bar-container {
    height: 60px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.results-display .result-bar-fill {
    height: 100%;
    background: #FECC00;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 28px;
    font-weight: 700;
    transition: width 0.8s ease;
}

.text-responses-display {
    max-height: 600px;
    overflow-y: auto;
}

.text-response-item {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    font-size: 20px;
    border-left: 4px solid #FECC00;
}

.rating-display {
    text-align: center;
    padding: 20px;
}

.rating-average {
    font-size: 80px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 10px;
}

.rating-label {
    font-size: 20px;
    color: #666;
}

/* Rating Scale Results Layout */
.rating-scale-results {
    width: 100%;
    padding: 20px;
}

.rating-scale-header {
    display: flex;
    align-items: center;
    gap: 40px;
}

.rating-scale-average {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.rating-scale-number {
    font-size: 80px;
    font-weight: 700;
    color: #ffd700;
    line-height: 1;
}

.rating-scale-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rating-scale-count {
    font-size: 20px;
    color: #666;
    font-weight: 600;
}

.rating-scale-range {
    font-size: 16px;
    color: #999;
}

.scale-labels-inline {
    font-size: 16px;
    color: #666;
}

.rating-scale-distribution {
    flex: 1;
    min-width: 0;
}

/* Compact Distribution Display (for rating_scale) */
.compact-distribution {
    width: 100%;
    padding: 0;
}

.compact-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 120px;
    padding: 0;
}

.compact-bar-wrapper {
    flex: 1;
    max-width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.compact-bar-container {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: flex-end;
}

.compact-bar-fill {
    width: 100%;
    background: #FEDB00;
    border-radius: 6px 6px 0 0;
    transition: height 0.6s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
    min-height: 0;
}

.compact-bar-count {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.compact-bar-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .landing-card {
        padding: 40px 25px;
    }

    .live-content {
        padding: 15px;
    }

    .content-card {
        padding: 25px 18px;
    }

    .question-container {
        margin-bottom: 20px;
    }

    .question-container h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .option-item {
        padding: 14px 16px;
        font-size: 15px;
    }

    .rating-input {
        gap: 10px;
        margin: 20px 0;
    }

    .star {
        font-size: 36px;
    }

    .btn-submit {
        padding: 14px;
        font-size: 16px;
    }

    .presenter-header {
        padding: 12px 15px;
    }

    .presenter-header .header-logo {
        height: 35px;
    }

    .presenter-header h1 {
        font-size: 18px;
    }

    .question-display {
        padding: 25px 15px;
    }

    .question-display h2 {
        font-size: 24px;
    }
}

/* Very small screens */
@media (max-width: 375px) {
    .content-card {
        padding: 20px 15px;
    }

    .question-container h2 {
        font-size: 18px;
    }

    .option-item {
        padding: 12px 14px;
        font-size: 14px;
    }

    .live-header h1 {
        font-size: 16px;
    }

    .live-header img.header-logo {
        height: 32px;
    }
}
