/* Teeth CSS - Teeth Projesi Stilleri */

/* Split Layout */
.split-layout {
    display: flex;
    gap: 50px;
    min-height: 700px;
}

/* Sol Panel - Resim Alanı (2/3) */
.left-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.image-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.image-section h3 {
    color: #333;
    margin-bottom: 20px;
    margin-top: 0;
    text-align: center;
    font-size: 1.3em;
}

/* Image placeholder default layout */
.image-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 3px dashed #ddd;
    border-radius: 15px;
    margin-bottom: 20px;
    min-height: 500px;
    position: relative;
}

/* Loading state helper */
.image-placeholder.loading .placeholder-content {
    display: none;
}

#loading-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    z-index: 10;
}

#loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

#loading-spinner p {
    color: #333;
    font-weight: 600;
    margin: 0;
}

.placeholder-content {
    text-align: center;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 4em;
    margin-bottom: 15px;
    color: #ccc;
}

.placeholder-content p {
    font-size: 1.1em;
    margin: 0;
}

/* Sağ Panel - Form Alanı (1/3) */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 0px 25px 25px 25px;
    height: 100%;
}

.form-section h3 {
    color: #333;
    margin-bottom: 20px;
    margin-top: 0;
    text-align: center;
    font-size: 1.3em;
}

/* File Upload Styles */
.upload-form {
    margin: 30px 0;
}

.file-upload-container {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-input {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 3px dashed #ddd;
    border-radius: 15px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.file-upload-label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 1.8em;
    color: #667eea;
    flex-shrink: 0;
}

.upload-text {
    text-align: left;
}

.upload-title {
    display: block;
    font-size: 1em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.upload-subtitle {
    display: block;
    font-size: 0.9em;
    color: #666;
}

.selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #e8f5e8;
    border: 2px solid #4caf50;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
}

.file-name {
    font-weight: 500;
    color: #2e7d32;
    flex: 1;
    margin-right: 10px;
}

.remove-file {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.remove-file:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    width: 100%;
    min-height: 60px;
    box-sizing: border-box;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.upload-btn:active {
    transform: translateY(0);
}

/* Results Container Styles */
.results-container {
    margin-top: 0;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

.results-content h3 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5em;
}

.image-preview-large {
    text-align: center;
    margin-bottom: 25px;
}

.image-preview-large img {
    max-width: 100%;
    max-height: 800px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 3px solid #f0f0f0;
}

.detection-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 300px;
    margin: 0 auto;
}

.summary-label {
    font-weight: 600;
    color: #333;
}

.summary-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #f5c6cb;
    margin-top: 20px;
    text-align: center;
}

.error-message p {
    margin: 0;
    font-weight: 500;
}

/* Responsive adjustments for split layout */
@media (max-width: 768px) {
    .split-layout {
        flex-direction: column;
        gap: 30px;
    }

    .left-panel,
    .right-panel {
        flex: none;
    }

    .image-placeholder {
        min-height: 350px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .placeholder-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .placeholder-icon {
        font-size: 3em;
        margin-bottom: 12px;
    }

    .placeholder-content p {
        font-size: 1em;
    }

    .form-section {
        padding: 20px;
    }

    .content-wrapper {
        padding: 30px;
    }
}

/* Responsive adjustments for file upload */
@media (max-width: 768px) {
    .file-upload-container {
        gap: 12px;
        flex-direction: column;
    }

    .file-upload-label {
        padding: 12px;
        min-height: 50px;
        gap: 8px;
        width: 100%;
    }

    .upload-icon {
        font-size: 1.5em;
    }

    .upload-title {
        font-size: 0.9em;
    }

    .upload-btn {
        padding: 12px 25px;
        font-size: 1em;
        min-height: 50px;
        width: 100%;
    }

    .selected-file {
        min-height: 50px;
        padding: 12px;
        width: 100%;
    }
}

/* Responsive adjustments for results */
@media (max-width: 768px) {
    .results-container {
        padding: 15px;
        margin-top: 20px;
    }

    .image-preview-large img {
        max-height: 600px;
    }
}