
:root {
    --primary-color: #007BFF;
    --secondary-color: #6C757D;
    --success-color: #28A745;
    --danger-color: #DC3545;
    --warning-color: #FFC107;
    --info-color: #17A2B8;
    
    /* Light mode defaults */
    --bg-color: #F8F9FA;
    --container-bg: #ffffff;
    --text-color: #343A40;
    --shadow-color: rgba(0, 0, 0, 0.1);

    --gradient-start: #6a11cb;
    --gradient-end: #2575fc;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #f0f0f0;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Pretendard', 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.1' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    margin: 0;
    transition: background-color 0.3s ease;
}

.container {
    position: relative;
    text-align: center;
    background: var(--container-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    max-width: 90%;
    width: 600px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
}

.theme-toggle {
    position: absolute;
    top: 15px;
    right: 20px;
}

#theme-toggle-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
}

h1 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 2rem;
}

.description {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

#test-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.file-upload {
    margin-bottom: 20px;
}

.upload-label {
    display: inline-block;
    background-image: linear-gradient(to right, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.upload-label:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 117, 252, 0.5);
}

#image-preview-container {
    width: 300px;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px var(--shadow-color);
    margin-bottom: 20px;
}

#image-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#label-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prediction-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(128, 128, 128, 0.1);
    padding: 10px;
    border-radius: 10px;
}

.bar-wrap {
    flex-grow: 1;
    height: 20px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background-image: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    width: 0%;
    transition: width 0.2s ease;
}

.class-name {
    width: 80px;
    text-align: right;
    font-weight: bold;
    color: var(--text-color);
}

.probability-text {
    width: 50px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.partnership-container {
    text-align: left;
}

.partnership-container hr {
    border: 0;
    border-top: 1px solid var(--shadow-color);
    margin: 30px 0;
}

.partnership-container h2 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-weight: bold;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--shadow-color);
    border-radius: 10px;
    background-color: var(--bg-color);
    color: var(--text-color);
    box-sizing: border-box;
    font-family: inherit;
}

.submit-button {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 1.5rem;
    }
    #image-preview-container {
        width: 250px;
        height: 250px;
    }
}
