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

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.floating-shapes {
    width: 100%;
    height: 100%;
    position: relative;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    top: 20%;
    left: 10%;
    animation-delay: -2s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #4ecdc4, #6ee8e0);
    top: 60%;
    left: 80%;
    animation-delay: -4s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #feca57, #ff9ff3);
    top: 30%;
    right: 20%;
    animation-delay: -1s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #48dbfb, #0abde3);
    bottom: 20%;
    left: 15%;
    animation-delay: -3s;
}

.shape-5 {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #ff9ff3, #f368e0);
    top: 10%;
    right: 10%;
    animation-delay: -5s;
}

.shape-6 {
    width: 90px;
    height: 90px;
    background: linear-gradient(45deg, #55a3ff, #3742fa);
    bottom: 30%;
    right: 30%;
    animation-delay: -2.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Form Page Styles */
.form-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.form-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Input Styles */
.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.input-group label .emoji {
    font-size: 1.3rem;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* File Upload Styles */
.upload-wrapper {
    position: relative;
}

input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.upload-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-placeholder:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.upload-text {
    color: #6c757d;
    font-weight: 500;
}

/* Cropper Styles */
.cropper-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.cropper-wrapper {
    text-align: center;
}

.cropper-controls {
    margin-top: 15px;
    gap: 10px;
    display: flex;
    justify-content: center;
}

/* Preview Styles */
.preview-container {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.preview-container img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn-submit {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.6);
}

.btn-crop {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Gallery Page Styles */
.gallery-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gallery-header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.gallery-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.gallery-subtitle {
    color: #6c757d;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.btn-presentation {
    background: linear-gradient(135deg, #ff9ff3, #f368e0);
    color: white;
    font-size: 1.2rem;
    padding: 18px 35px;
    box-shadow: 0 10px 30px rgba(255, 159, 243, 0.4);
}

.btn-presentation:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 159, 243, 0.6);
}

.stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.stat-item .emoji {
    font-size: 1.3rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.submission-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: cardAppear 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.submission-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardDisappear {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

.card-header {
    margin-bottom: 20px;
}

.group-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-timestamp {
    color: #6c757d;
    font-size: 0.9rem;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.card-image:hover {
    transform: scale(1.02);
}

.card-conclusion {
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 500;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.star-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #ffa726;
}

.btn-vote {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: white;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-vote:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(254, 202, 87, 0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.9);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-state p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 25px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.4s ease;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4757;
}

/* Success Modal */
.success-modal {
    text-align: center;
    padding: 60px 40px;
    max-width: 500px;
}

.success-animation {
    margin-bottom: 30px;
}

.checkmark {
    font-size: 4rem;
    color: #2ed573;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.success-modal h2 {
    color: #2ed573;
    font-size: 2rem;
    margin-bottom: 15px;
}

.success-modal p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Presentation Modal */
.presentation-modal .modal-content {
    max-width: 900px;
    padding: 40px;
}

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

.presentation-header h2 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Roulette Animation Styles */
.roulette-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    overflow: hidden;
    will-change: opacity;
    transform: translateZ(0);
}

.roulette-header {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    z-index: 2001;
}

.roulette-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.roulette-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

.roulette-track {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    gap: 30px;
    padding: 0 50px;
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.roulette-card {
    min-width: 300px;
    height: 350px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border: 3px solid transparent;
    will-change: transform, border-color, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.roulette-card.center {
    border-color: #ff6b6b;
    transform: scale(1.1);
    box-shadow: 0 30px 60px rgba(255, 107, 107, 0.4);
    background: rgba(255, 255, 255, 1);
}

.roulette-card-header {
    margin-bottom: 20px;
}

.roulette-group-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.roulette-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
}

.roulette-conclusion {
    color: #333;
    line-height: 1.4;
    font-weight: 500;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    font-size: 0.9rem;
}

.roulette-selector {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 400px;
    background: linear-gradient(to bottom, #ff6b6b, #ffa726);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
    z-index: 2001;
    opacity: 0.9;
}

.roulette-selector::before,
.roulette-selector::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 0;
    height: 0;
    border-style: solid;
}

.roulette-selector::before {
    top: -15px;
    transform: translateX(-50%);
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 15px solid #ff6b6b;
}

.roulette-selector::after {
    bottom: -15px;
    transform: translateX(-50%);
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #ffa726;
}

/* Roulette Animation Classes */
.roulette-spinning {
    animation: rouletteSpin 4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

@keyframes rouletteSpin {
    0% {
        transform: translateX(100vw) translateY(-50%);
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    }
    20% {
        transform: translateX(-300vw) translateY(-50%);
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    }
    60% {
        transform: translateX(-100px) translateY(-50%);
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    }
    80% {
        transform: translateX(calc(var(--final-position) + 20px)) translateY(-50%);
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    }
    90% {
        transform: translateX(calc(var(--final-position) - 10px)) translateY(-50%);
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    }
    95% {
        transform: translateX(calc(var(--final-position) + 5px)) translateY(-50%);
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    }
    100% {
        transform: translateX(var(--final-position)) translateY(-50%);
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    }
}

.roulette-result {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1s ease 3.5s forwards;
}

.result-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.result-button {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(78, 205, 196, 0.4);
}

/* Custom Alert Modal */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: alertFadeIn 0.3s ease;
}

.custom-alert.show {
    display: flex;
}

.alert-content {
    background: white;
    border-radius: 25px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    animation: alertBounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.alert-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff6b6b, #ffa726, #4ecdc4, #45b7d1);
    background-size: 300% 100%;
    animation: gradientFlow 2s ease-in-out infinite;
}

.alert-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    animation: iconPulse 2s ease-in-out infinite;
}

.alert-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.alert-message {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 500;
}

.alert-button {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 35px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    position: relative;
    overflow: hidden;
}

.alert-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.alert-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.6);
}

.alert-button:hover:before {
    left: 100%;
}

@keyframes alertFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes alertBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Different alert types */
.alert-content.warning .alert-icon { color: #ffa726; }
.alert-content.error .alert-icon { color: #ff6b6b; }
.alert-content.success .alert-icon { color: #4ecdc4; }
.alert-content.info .alert-icon { color: #45b7d1; }

.alert-content.warning .alert-button {
    background: linear-gradient(135deg, #ffa726, #ff9800);
    box-shadow: 0 10px 30px rgba(255, 167, 38, 0.4);
}

.alert-content.warning .alert-button:hover {
    box-shadow: 0 15px 35px rgba(255, 167, 38, 0.6);
}

.alert-content.error .alert-button {
    background: linear-gradient(135deg, #ff6b6b, #e74c3c);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.alert-content.error .alert-button:hover {
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.6);
}

.alert-content.success .alert-button {
    background: linear-gradient(135deg, #4ecdc4, #2ecc71);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.4);
}

.alert-content.success .alert-button:hover {
    box-shadow: 0 15px 35px rgba(78, 205, 196, 0.6);
}

/* Star Animation Effects */
.star-fall-animation {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: #feca57;
    pointer-events: none;
    z-index: 100;
    animation: starFall 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes starFall {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(-20px) scale(0.5) rotate(0deg);
        filter: drop-shadow(0 0 10px #feca57);
    }
    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(50px) scale(1.2) rotate(180deg);
        filter: drop-shadow(0 0 15px #feca57);
    }
    60% {
        opacity: 1;
        transform: translateX(-50%) translateY(200px) scale(1) rotate(360deg);
        filter: drop-shadow(0 0 20px #feca57);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(280px) scale(0.3) rotate(540deg);
        filter: drop-shadow(0 0 5px #feca57);
    }
}

/* Star burst effect for the target icon */
.star-burst {
    position: relative;
}

.star-burst::after {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0;
    pointer-events: none;
    animation: starBurst 0.8s ease-out;
}

@keyframes starBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}

/* Multiple stars animation for higher ratings */
.multi-stars {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 100;
}

.multi-stars .star-particle {
    position: absolute;
    font-size: 1.2rem;
    color: #feca57;
    opacity: 1;
}

.multi-stars .star-particle:nth-child(1) {
    left: 20%;
    animation: starFallMulti 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0s;
}

.multi-stars .star-particle:nth-child(2) {
    left: 35%;
    animation: starFallMulti 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.2s;
}

.multi-stars .star-particle:nth-child(3) {
    left: 50%;
    animation: starFallMulti 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.4s;
}

.multi-stars .star-particle:nth-child(4) {
    left: 65%;
    animation: starFallMulti 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.6s;
}

.multi-stars .star-particle:nth-child(5) {
    left: 80%;
    animation: starFallMulti 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.8s;
}

@keyframes starFallMulti {
    0% {
        opacity: 1;
        transform: translateY(-20px) scale(0.3) rotate(0deg);
        filter: drop-shadow(0 0 8px #feca57);
    }
    25% {
        opacity: 1;
        transform: translateY(80px) scale(1) rotate(90deg);
        filter: drop-shadow(0 0 12px #feca57);
    }
    50% {
        opacity: 1;
        transform: translateY(160px) scale(0.8) rotate(180deg);
        filter: drop-shadow(0 0 15px #feca57);
    }
    75% {
        opacity: 0.8;
        transform: translateY(240px) scale(0.6) rotate(270deg);
        filter: drop-shadow(0 0 10px #feca57);
    }
    100% {
        opacity: 0;
        transform: translateY(300px) scale(0.2) rotate(360deg);
        filter: drop-shadow(0 0 5px #feca57);
    }
}

/* Star count bounce animation */
.star-count-bounce {
    animation: countBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes countBounce {
    0% {
        transform: scale(1);
        color: #ffa726;
    }
    50% {
        transform: scale(1.8);
        color: #ff6b6b;
        text-shadow: 0 0 15px #ff6b6b;
    }
    100% {
        transform: scale(1);
        color: #ffa726;
        text-shadow: none;
    }
}

/* Pulsing glow for star display during animation */
.star-display-glow {
    animation: starGlow 2s ease-in-out;
}

@keyframes starGlow {
    0%, 100% {
        box-shadow: none;
    }
    50% {
        box-shadow: 0 0 20px rgba(254, 202, 87, 0.6);
        transform: scale(1.05);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive adjustments for roulette */
@media (max-width: 768px) {
    .roulette-title {
        font-size: 2rem;
    }
    
    .roulette-card {
        min-width: 250px;
        height: 300px;
        padding: 20px;
    }
    
    .roulette-group-name {
        font-size: 1.3rem;
    }
    
    .roulette-card-image {
        height: 120px;
    }
    
    .roulette-selector {
        height: 350px;
    }
    
    .result-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .roulette-card {
        min-width: 200px;
        height: 250px;
        padding: 15px;
    }
    
    .roulette-group-name {
        font-size: 1.1rem;
    }
    
    .roulette-card-image {
        height: 100px;
    }
    
    .roulette-conclusion {
        font-size: 0.8rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    
    .roulette-selector {
        height: 300px;
    }
    
    .result-button {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

.group-name-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    color: white;
}

.group-name-section h3 {
    font-size: 2rem;
    font-weight: 700;
}

.image-section {
    text-align: center;
    margin-bottom: 30px;
}

.image-section img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.conclusion-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.conclusion-section h4 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.conclusion-section p {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Voting Modal */
.voting-modal .modal-content {
    max-width: 500px;
    padding: 40px;
    text-align: center;
}

.voting-header h3 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.voting-header p {
    color: #6c757d;
    margin-bottom: 30px;
}

.star-rating {
    margin-bottom: 30px;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.star {
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.star:hover,
.star.active {
    filter: grayscale(0%);
    transform: scale(1.2);
}

.rating-text {
    color: #6c757d;
    font-weight: 500;
}

.voting-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-vote {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: white;
}

.btn-vote:disabled {
    background: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-wrapper {
        padding: 30px 20px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .gallery-title {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats {
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
    
    .presentation-modal .modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .shape {
        display: none;
    }
    
    .cropper-controls {
        flex-direction: column;
    }
    
    .voting-buttons {
        flex-direction: column;
    }
    
    .stars {
        gap: 5px;
    }
    
    .star {
        font-size: 2rem;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    max-width: 400px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-left: 4px solid #2E7D32;
}

.notification.error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border-left: 4px solid #c62828;
}

.notification.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-left: 4px solid #e65100;
}

.notification-content {
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.4;
}

/* Mobile responsive for notifications */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}