/**
 * InfinitStory CSS Styles
 * Clean design with minimal styling
 */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

/* BabyMonsta font is loaded via Elementor */

/* Main container - minimal styling */
.infinitstory-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Open Sans', sans-serif;
    position: relative;
    min-height: 400px;
}

/* Start form */
#infinitstory-start-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-intro {
    color: #ec1c23;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 30px;
    font-family: 'BabyMonsta';
    line-height: 1.1em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: #FFFFFF;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.char-counter {
    color: #FEE01F;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-option label {
    display: inline-block;
    padding: 10px 20px;
    background: #EC1C23;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    color: #FFFFFF;
}

.radio-option input[type="radio"]:checked + label,
.radio-option label:hover {
    background: #FFFFFF;
    color: #000000;
}

/* Submit button */
.submit-button {
    background: #EC1C23 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 15px 40px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
    display: block !important;
    width: 100% !important;
    margin: 30px auto 0 !important;
    text-transform: none !important;
    letter-spacing: 1px !important;
}

.submit-button:hover {
    background: #FFFFFF !important;
    color: #000000 !important;
}

/* Story display */
.story-display {
    animation: fadeIn 0.5s ease;
}

.story-section {
    margin-bottom: 40px;
}

/* Story image */
.story-image-container {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.story-image {
    width: 100%;
    height: auto;
    display: block;
    animation: fadeIn 1s ease;
}

.story-text {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px;
    border-radius: 10px;
    font-size: 1.3rem;
    color: #333333;
    margin-bottom: 25px;
    position: relative;
    min-height: 180px;
    font-weight: 700;
}

/* Story emojis */
.story-emoji {
    font-size: 50px;
    width: 60px;
    height: 60px;
    line-height: 1;
    opacity: 0.8;
    animation: floatEmoji 3s ease-in-out infinite;
    display: inline-block;
    margin: 0 15px 10px 15px;
    vertical-align: middle;
}

.story-emoji.float-left {
    float: left;
    margin: 5px 20px 15px 0;
}

.story-emoji.float-right {
    float: right;
    margin: 5px 0 15px 20px;
}

.story-text-content {
    overflow: hidden;
}

@keyframes floatEmoji {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* Character dialogs */
.dialog-ben {
    border-left: 4px solid #EC1C23;
    padding-left: 15px;
    margin: 10px 0;
    display: inline-block;
    font-style: italic;
    color: #EC1C23;
    font-weight: 600;
}

.dialog-pia {
    border-left: 4px solid #FEE01F;
    padding-left: 15px;
    margin: 10px 0;
    display: inline-block;
    font-style: italic;
    color: #D4A017;
    font-weight: 600;
}

/* Sound effects - Comic style */
.sound-effect {
    display: inline-block;
    background: #EC1C23;
    color: #FFFFFF;
    font-family: 'BabyMonsta', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    padding: 8px 20px;
    border-radius: 15px;
    transform: rotate(-5deg);
    margin: 5px 10px;
    position: relative;
    line-height: 1;
    animation: popEffect 0.5s ease-out;
    vertical-align: middle;
}

.sound-effect:nth-of-type(even) {
    transform: rotate(3deg);
    background: #FEE01F;
    color: #000000;
}

.sound-effect:nth-of-type(3n) {
    transform: rotate(-3deg);
    background: #EC1C23;
}

@keyframes popEffect {
    0% {
        transform: scale(0) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(-5deg);
    }
}

/* Story text paragraphs */
.story-text p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.story-text p:last-child {
    margin-bottom: 0;
}

/* Story choices */
.story-choices {
    margin-top: 30px;
}

.choices-prompt {
    color: #EC1C23;
    font-size: 2.5rem;
    font-family: 'BabyMonsta', sans-serif;
    font-weight: normal;
    text-align: center;
    margin-bottom: 30px;
    margin-top: 60px;
}

.story-choice {
    background: #FFFFFF;
    color: #000000;
    border: none;
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: flex-start;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.story-choice:hover:not(.disabled) {
    background: #000000;
    color: #FFFFFF;
	border: 2px solid #ffffff;
}

.story-choice:hover:not(.disabled) .choice-number {
    background: #FFFFFF;
    color: #000000;
}

.story-choice.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.story-choice.selected {
    background: #EC1C23;
    color: #FFFFFF;
}

.story-choice.selected .choice-number {
    background: #FFFFFF;
    color: #EC1C23;
}

.choice-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: #000000;
    color: #FFFFFF;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.choice-text {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Loading state */
.loading-container {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #FFFFFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-message {
    color: #FFFFFF;
    font-size: 2rem;
    font-family: 'BabyMonsta';
    line-height: 1.1em;
    font-style: normal;
}

/* Error messages */
.error-message {
    background: #EC1C23;
    color: #FFFFFF;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

/* Story ending */
.story-ending {
    text-align: center;
    padding: 30px;
}

.ending-message {
    color: #FEE01F;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
}

.restart-story {
    background: #EC1C23;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-transform: none;
    letter-spacing: 1px;
}

.restart-story:hover {
    background: #FFFFFF;
    color: #000000;
}

/* Ending option */
.ending-option {
    background: rgba(254, 224, 31, 0.1);
    border: none;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
}

.ending-option p {
    color: #FFFFFF;
    font-size: 18px;
    margin-bottom: 20px;
}

.end-story {
    background: #FEE01F;
    color: #000000;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.end-story:hover {
    background: #FFFFFF;
    color: #000000;
}

/* Honeypot field (hidden) */
.honeypot {
    position: absolute;
    left: -9999px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive design */
@media (max-width: 768px) {
    .story-text {
        font-size: 16px;
        padding: 20px;
    }
    
    .story-choice {
        padding: 15px;
        font-size: 14px;
    }
    
    .form-intro {
        font-size: 18px;
    }
    
    .choices-prompt {
        font-size: 1.5rem;
    }
    
    .ending-message {
        font-size: 24px;
    }
    
    .submit-button,
    .restart-story {
        font-size: 16px;
        padding: 12px 30px;
    }
}

@media (max-width: 480px) {
    .radio-group {
        flex-direction: column;
    }
    
    .choices-prompt {
        font-size: 1.3rem;
    }
}