/* Face Shape Detection Styles - Updated for Interactive UX */

.faceshape-upload-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
    color: #e0e0e0;
    border: 1px solid #333;
    position: relative;
}

.faceshape-upload-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}

.faceshape-upload-container p {
    text-align: center;
    margin-bottom: 25px;
    font-size: 16px;
    color: #bbbbbb;
}

/* Duo container for side-by-side layout */
.duo_container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.left_container {
    flex: 1;
    min-width: 300px;
}

.right_container {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-text-primary {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.4;
}

/* Notice styling */
.faceshape-notice {
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.faceshape-notice p {
    margin: 8px 0;
    font-size: 15px;
    color: #cccccc;
}

.faceshape-notice p strong {
    font-size: 17px;
    color: #ffffff;
    display: block;
}

/* Form elements */
.custom_form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gender-selection {
    margin-bottom: 15px;
}

.gender-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.gender-options {
    display: flex;
    gap: 20px;
}

.gender-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.gender-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #444;
    border-radius: 50%;
    background-color: #2d2d2d;
    cursor: pointer;
    position: relative;
}

.gender-option input[type="radio"]:checked {
    border-color: #3b82f6;
}

.gender-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: #3b82f6;
    border-radius: 50%;
}

.gender-label {
    font-size: 16px;
    color: #e0e0e0;
}

.custom-form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid #444;
    border-radius: 12px;
    background-color: #2d2d2d;
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.custom-form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.custom-btn {
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(59, 130, 246, 0.3);
}

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

/* Loading overlay */
#faceshape-loading {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    color: white;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
}

/* Result container */
.result_container {
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

/* Primary result card */
.primary-result-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #334155;
    position: relative;
    overflow: hidden;
}

.primary-result-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3b82f6, #60a5fa, #3b82f6);
    z-index: -1;
    border-radius: 18px;
    animation: borderAnimation 3s linear infinite;
    background-size: 300% 300%;
}

.best-match-badge {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.shape-result-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.primary-shape-name {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
}

.primary-shape-percentage {
    font-size: 24px;
    font-weight: 700;
    color: #3b82f6;
}

/* Suggestion navigation */
.suggestion-navigation {
    background: #1e293b;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #334155;
}

.nav-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #334155;
    border: none;
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: #475569;
    transform: translateY(-2px);
}

/* Other shapes */
.other-shapes-section {
    background: #1e293b;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid #334155;
}

.other-shapes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.other-shape-item {
    background: #334155;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid #475569;
}

.other-shape-name {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    text-transform: uppercase;
}

.other-shape-percentage {
    font-size: 18px;
    font-weight: 700;
    color: #3b82f6;
}

/* Error styling */
.faceshape-error {
    background: #2d2d2d;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    color: #e74c3c;
    border: 1px solid #c0392b;
    animation: shake 0.5s ease-in-out;
}

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

@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%,60% { transform: translateX(-5px); }
    40%,80% { transform: translateX(5px); }
}

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

/* Responsive */
@media (max-width: 992px) {
    .duo_container { flex-direction: column; }
    .left_container, .right_container { min-width: 100%; }
    .primary-shape-name { font-size: 28px; }
    .primary-shape-percentage { font-size: 20px; }
}

@media (max-width: 600px) {
    .faceshape-upload-container { margin: 20px 15px; padding: 20px; }
    .primary-shape-name { font-size: 24px; }
    .primary-shape-percentage { font-size: 18px; }
    .nav-button { padding: 12px 15px; }
    .other-shapes-grid { grid-template-columns: repeat(2, 1fr); }
}
