@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #5643cc;
    --primary-dark: #3a2b8e;
    --secondary-color: #ff5722;
    --text-color: #333;
    --light-bg: #f8f8f8;
    --dark-bg: #1a1a1a;
    --card-bg: #ffffff;
    --border-color: #e1e1e1;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%235643cc' fill-opacity='0.06'%3E%3Cpath d='M0 20L20 0v20H0zm20 0l20-20v20H20zM20 40L0 20h20v20zm0-20h20l-20 20V20z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    color: var(--text-color);
    font-size: 1.1rem;
}

.creator-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    background-color: var(--primary-dark);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-content {
    padding: 30px;
}

.tab-content h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

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

.form-columns {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-column {
    flex: 1;
}

@media (max-width: 768px) {
    .form-columns {
        flex-direction: column;
    }
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(86, 67, 204, 0.2);
}

.generate-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.generate-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

.hidden {
    display: none;
}

.result-container {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    background-color: rgba(86, 67, 204, 0.05);
    border: 1px solid rgba(86, 67, 204, 0.2);
}

.result-container h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.result-content {
    display: flex;
    gap: 30px;
}

@media (max-width: 768px) {
    .result-content {
        flex-direction: column;
    }
    
    .generated-image {
        max-width: 100%;
    }
}

.result-description, .result-details {
    flex: 1;
}

.result-details h4, .result-description h4 {
    color: var(--secondary-color);
    margin: 15px 0 8px;
}

.result-description p, .result-details p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.result-details ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.result-details li {
    margin-bottom: 6px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

.curse-energy {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    position: relative;
    margin-bottom: 15px;
    box-shadow: 0 0 15px var(--primary-color);
    animation: pulse 1.5s infinite, rotate 3s linear infinite;
}

.curse-energy::before, .curse-energy::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.7;
    animation: ripple 1.5s infinite;
}

.curse-energy::after {
    animation-delay: 0.5s;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.8;
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes rotate {
    0% {
        box-shadow: 0 0 15px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 25px var(--secondary-color);
    }
    100% {
        box-shadow: 0 0 15px var(--primary-color);
    }
}

.loading-spinner p {
    color: var(--primary-color);
    font-weight: 500;
}

.toggle-container {
    position: relative;
    display: inline-block;
}

input[type="checkbox"] {
    height: 0;
    width: 0;
    visibility: hidden;
    position: absolute;
}

.toggle-label {
    cursor: pointer;
    width: 60px;
    height: 30px;
    background: #ccc;
    display: block;
    border-radius: 30px;
    position: relative;
}

.toggle-label:after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 24px;
    transition: 0.3s;
}

input:checked + .toggle-label {
    background: var(--primary-color);
}

input:checked + .toggle-label:after {
    left: calc(100% - 3px);
    transform: translateX(-100%);
}

.sorcerer-profile {
    background-color: #f3f1ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.sorcerer-profile-field {
    margin-bottom: 8px;
}

.sorcerer-profile-field .label {
    font-weight: 600;
    color: var(--primary-dark);
    display: inline-block;
    min-width: 100px;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.action-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--primary-dark);
}

.generated-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin: 15px 0;
}

.image-container {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
}

.details-container {
    margin-top: 15px;
    background-color: rgba(255,255,255,0.7);
    border-radius: 8px;
    padding: 10px;
    border-left: 4px solid var(--primary-color);
}

.detail-item {
    margin-bottom: 5px;
}

.detail-label {
    font-weight: bold;
    color: var(--primary-dark);
}

.advanced-toggle {
    margin-top: 10px;
    text-align: center;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: bold;
}

.advanced-options {
    margin-top: 10px;
    padding: 10px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    background-color: rgba(86, 67, 204, 0.05);
}