/* Lips Shape Detector - Elegant Pink Design */

/* Main Container */
#lips-shape-detector-main {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    padding: 0 20px;
}

/* Header Section */
#lips-shape-detector-main header {
    text-align: center;
    margin-bottom: 30px;
}

#lips-shape-detector-main header h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

#lips-shape-detector-main header p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #e6c0d4;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    background-color: #fef5f9;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #d670a8;
    background-color: #fef0f6;
}

/* File Input (Hidden) */
#lips-image-input {
    display: none;
}

/* Upload Button */
.upload-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #d670a8, #be5c95);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(214, 112, 168, 0.3);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-button:hover {
    background: linear-gradient(135deg, #be5c95, #d670a8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 112, 168, 0.4);
}

.upload-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(214, 112, 168, 0.3);
}

/* Selected File Name */
.selected-file-name {
    margin-top: 15px;
    font-size: 14px;
    color: #777;
    min-height: 20px;
    font-weight: 500;
}

/* Upload Preview */
.upload-preview {
    text-align: center;
    margin: 30px 0;
}

#lips-image-preview {
    max-width: 100%;
    width: auto;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 4px solid white;
    display: none;
    margin: 0 auto;
}

#lips-image-preview[style*="display: block"] {
    animation: fadeIn 0.5s ease;
}

/* Submit Container */
.submit-container {
    text-align: center;
    margin-top: 25px;
}

/* Analyze Button */
.analyze-button {
    width: 100%;
    max-width: 320px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #d670a8, #be5c95);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(214, 112, 168, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analyze-button:hover:not(.disabled) {
    background: linear-gradient(135deg, #be5c95, #d670a8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 112, 168, 0.4);
}

.analyze-button:active:not(.disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(214, 112, 168, 0.3);
}

.analyze-button.disabled {
    background: linear-gradient(135deg, #cccccc, #b3b3b3);
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading Indicator */
#lips-shape-loading {
    text-align: center;
    padding: 50px 20px;
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(214, 112, 168, 0.2);
    border-radius: 50%;
    border-top-color: #d670a8;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#lips-shape-loading p {
    color: #666;
    font-size: 18px;
    margin: 0;
    font-weight: 500;
}

/* Error Container */
#lips-shape-error {
    background-color: #fff0f5;
    border-left: 5px solid #ff6b9b;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 8px;
    display: none;
    animation: slideIn 0.3s ease;
}

.error-message {
    color: #e6477a;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

/* RESULTS STYLING */
#lips-shape-results {
    display: none;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #fad6e5;
    background-color: #fff7fa;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    margin-top: 40px;
}

.results-content {
    padding: 0;
}

/* Results Header */
.results-header {
    background: linear-gradient(135deg, #fde9f1 0%, #fef5f9 100%);
    padding: 30px 20px;
    border-bottom: 2px solid #fad6e5;
    text-align: center;
}

.results-header h2 {
    margin: 0;
    color: #555;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Primary Shape Section */
.primary-shape {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.shape-label {
    font-weight: 700;
    color: #555;
    font-size: 16px;
    flex: 0 0 auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shape-value {
    color: #d670a8;
    font-size: 26px;
    font-weight: 700;
    flex: 0 0 auto;
    text-transform: capitalize;
    margin-right: auto;
}

/* Confidence Bar */
.confidence-bar-container {
    position: relative;
    height: 14px;
    background-color: #e9e9e9;
    border-radius: 10px;
    overflow: hidden;
    flex: 1;
    min-width: 150px;
}

.confidence-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #d670a8, #be5c95);
    border-radius: 10px;
    transition: width 0.8s ease;
    box-shadow: 0 0 10px rgba(214, 112, 168, 0.3);
}

.confidence-score {
    color: #666;
    font-weight: 700;
    font-size: 16px;
    flex: 0 0 auto;
}

/* Secondary Shapes */
.secondary-shapes {
    margin-top: 15px;
}

.secondary-shape-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 15px;
    flex-wrap: wrap;
}

.secondary-shape-name {
    flex: 0 0 auto;
    min-width: 120px;
    color: #666;
    font-weight: 600;
}

/* Results Sections */
.results-section {
    padding: 30px 25px;
    border-bottom: 1px solid #fad6e5;
}

.results-section:last-child {
    border-bottom: none;
}

/* Characteristics Grid */
.characteristics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.characteristic-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

.characteristic-card:hover {
    box-shadow: 0 5px 15px rgba(214, 112, 168, 0.2);
    transform: translateY(-3px);
    border-color: #fad6e5;
}

.characteristic-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.characteristic-value {
    font-weight: 700;
    color: #333;
    font-size: 18px;
}

/* Recommendations List */
.recommendations-list {
    margin-top: 15px;
}

.recommendation-item {
    background-color: white;
    border-radius: 10px;
    padding: 16px 20px 16px 50px;
    margin-bottom: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #d670a8;
    transition: all 0.3s ease;
    position: relative;
    line-height: 1.6;
    color: #444;
}

.recommendation-item:last-child {
    margin-bottom: 0;
}

.recommendation-item:hover {
    box-shadow: 0 5px 15px rgba(214, 112, 168, 0.2);
    transform: translateX(5px);
}

.recommendation-item::before {
    content: "✓";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #d670a8, #be5c95);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(214, 112, 168, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

#lips-shape-results[style*="display: block"] {
    animation: fadeInUp 0.6s ease;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    #lips-shape-detector-main {
        padding: 0 15px;
        margin: 20px auto;
    }

    #lips-shape-detector-main header h2 {
        font-size: 26px;
    }

    .upload-zone {
        padding: 30px 20px;
    }

    .primary-shape {
        flex-direction: column;
        align-items: flex-start;
    }

    .confidence-bar-container {
        width: 100%;
        margin: 10px 0;
    }

    .secondary-shape-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .secondary-shape-name {
        margin-bottom: 8px;
    }

    .characteristics-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .results-section {
        padding: 25px 20px;
    }
}

@media screen and (max-width: 480px) {
    #lips-shape-detector-main header h2 {
        font-size: 24px;
    }

    #lips-shape-detector-main header p {
        font-size: 14px;
    }

    .upload-zone {
        padding: 25px 15px;
    }

    .upload-button {
        padding: 12px 24px;
        font-size: 14px;
    }

    .analyze-button {
        font-size: 16px;
        padding: 14px 28px;
        max-width: 100%;
    }

    .characteristics-grid {
        grid-template-columns: 1fr;
    }

    .shape-value {
        font-size: 22px;
    }

    .results-section {
        padding: 20px 15px;
    }

    .recommendation-item {
        padding-left: 45px;
        font-size: 14px;
    }

    .recommendation-item::before {
        width: 22px;
        height: 22px;
        font-size: 12px;
        left: 12px;
    }

    .spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
}

/* Print Styles */
@media print {
    #lips-shape-detector-main header,
    .upload-zone,
    .upload-preview,
    .submit-container,
    #lips-shape-loading,
    #lips-shape-error {
        display: none;
    }

    #lips-shape-results {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-top: 0;
    }
}

/* Accessibility */
.upload-button:focus,
.analyze-button:focus {
    outline: 3px solid rgba(214, 112, 168, 0.5);
    outline-offset: 3px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}