/* Chilean University Admissions Calculator - Enhanced Styles */

/* Container Styles */
.cuc-calculator-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

.cuc-calculator-container {
    background: linear-gradient(135deg, rgba(251, 186, 3, 0.05) 0%, rgba(55, 221, 145, 0.05) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(251, 186, 3, 0.1);
    position: relative;
    overflow: hidden;
}

.cuc-calculator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FBBA03 0%, #37DD91 100%);
}

/* Header Styles */
.cuc-header {
    text-align: center;
    margin-bottom: 40px;
}

.cuc-header h2 {
    color: #2c3e50;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #FBBA03 0%, #37DD91 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cuc-header p {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Form Styles */
.cuc-form-group {
    margin-bottom: 25px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cuc-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1em;
    transition: color 0.3s ease;
}

.cuc-form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.cuc-form-group label .optional {
    color: #95a5a6;
    font-size: 0.85em;
    font-weight: 400;
    margin-left: 5px;
}

.cuc-form-group select,
.cuc-form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.cuc-form-group select:hover,
.cuc-form-group input:hover {
    border-color: #FBBA03;
}

.cuc-form-group select:focus,
.cuc-form-group input:focus {
    outline: none;
    border-color: #37DD91;
    box-shadow: 0 0 0 4px rgba(55, 221, 145, 0.1);
    transform: translateY(-2px);
}

.cuc-form-group input::placeholder {
    color: #bdc3c7;
}

/* Form Row Layout */
.cuc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

/* Score Inputs Grid */
.cuc-score-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

/* Calculate Button */
.cuc-calculate-button {
    background: linear-gradient(135deg, #37DD91 0%, #FBBA03 100%);
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 30px;
    box-shadow: 0 8px 20px rgba(55, 221, 145, 0.3);
    position: relative;
    overflow: hidden;
}

.cuc-calculate-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cuc-calculate-button:hover::before {
    left: 100%;
}

.cuc-calculate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(55, 221, 145, 0.4);
}

.cuc-calculate-button:active {
    transform: translateY(-1px);
}

/* Result Display */
.cuc-result-display {
    color: white;
    padding: 30px;
    margin-top: 30px;
    border-radius: 15px;
    text-align: center;
    display: none;
    animation: slideIn 0.5s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cuc-result-display.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cuc-result-display.success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.cuc-result-display.warning {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.cuc-result-score {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 15px;
    animation: pulse 1s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.cuc-result-message {
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.cuc-result-details {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    line-height: 1.8;
}

.cuc-result-details strong {
    font-weight: 700;
}

/* Error Message */
.cuc-error-message {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 25px;
    text-align: center;
    display: none;
    animation: shake 0.5s ease;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.cuc-error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Info Box */
.cuc-info-box {
    background: linear-gradient(135deg, rgba(251, 186, 3, 0.1) 0%, rgba(55, 221, 145, 0.1) 100%);
    border-left: 4px solid #FBBA03;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.cuc-info-box p {
    margin: 0;
    color: #2c3e50;
    line-height: 1.6;
}

/* Tooltip Styles */
.cuc-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

.cuc-tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85em;
    font-weight: 400;
}

.cuc-tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

.cuc-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cuc-calculator-container {
        padding: 25px;
        border-radius: 15px;
    }

    .cuc-header h2 {
        font-size: 1.6em;
    }

    .cuc-header p {
        font-size: 1em;
    }

    .cuc-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cuc-score-inputs {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cuc-calculate-button {
        padding: 16px 30px;
        font-size: 1.1em;
    }

    .cuc-result-score {
        font-size: 2.2em;
    }

    .cuc-result-message {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .cuc-calculator-container {
        padding: 20px;
    }

    .cuc-header h2 {
        font-size: 1.4em;
    }

    .cuc-form-group select,
    .cuc-form-group input {
        padding: 12px 15px;
    }

    .cuc-result-score {
        font-size: 2em;
    }
}

/* Loading Animation */
.cuc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.cuc-form-group select:focus-visible,
.cuc-form-group input:focus-visible {
    outline: 2px solid #37DD91;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .cuc-calculate-button {
        display: none;
    }

    .cuc-calculator-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
