:root {
    --achievement-gold: #ffd700;
    --achievement-green: #00ff00;
    --achievement-dark: #1a1a2e;
    --achievement-purple: #7c3aed;
    --achievement-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #ffffff;
    min-height: 100vh;
}

.tool-container {
    max-width: 1600px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--achievement-gradient);
    border-radius: 16px;
    border: 2px solid var(--achievement-gold);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.2);
}

.tool-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--achievement-gold), #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.tool-description {
    font-size: 1.3rem;
    color: #e0e0e0;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.credit-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--achievement-purple), #9333ea);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid #a855f7;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.tool-workspace {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 2rem;
    align-items: start;
}

.form-panel {
    background: rgba(26, 26, 46, 0.9);
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.form-panel h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--achievement-gold);
    font-weight: 700;
}

.quick-select-notice {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.1), rgba(0, 200, 0, 0.1));
    border-left: 4px solid var(--achievement-green);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #e0e0e0;
}

.quick-select-notice strong {
    color: var(--achievement-green);
    display: block;
    margin-bottom: 0.3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 1rem;
}

.form-group label .required {
    color: #ff4757;
    margin-left: 0.25rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: rgba(22, 33, 62, 0.6);
    color: #ffffff;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--achievement-gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    background: rgba(22, 33, 62, 0.9);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #16213e;
    color: #ffffff;
}

.field-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #a0a0a0;
    font-style: italic;
}

.btn-primary {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--achievement-gold), #ffed4e);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

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

.btn-primary.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.tips-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(124, 58, 237, 0.3);
}

.tips-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--achievement-purple);
}

.tips-section ul {
    list-style: none;
    padding-left: 0;
}

.tips-section ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #d0d0d0;
}

.tips-section ul li:before {
    content: '🎮';
    position: absolute;
    left: 0;
}

.preview-panel {
    background: rgba(26, 26, 46, 0.9);
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.preview-panel h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--achievement-gold);
    font-weight: 700;
}

.canvas-container {
    background: #000000;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.2);
}

.canvas-container canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.preview-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.preview-actions button {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success {
    background: linear-gradient(135deg, var(--achievement-green), #00cc00);
    color: #000000;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 255, 0, 0.5);
}

.btn-secondary {
    background: rgba(124, 58, 237, 0.8);
    color: #ffffff;
    border: 2px solid var(--achievement-purple);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(124, 58, 237, 1);
    transform: translateY(-2px);
}

.preview-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.preview-note {
    text-align: center;
    color: #a0a0a0;
    font-size: 0.95rem;
    font-style: italic;
}

.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.notification.success {
    background: linear-gradient(135deg, var(--achievement-green), #00cc00);
    color: #000000;
    border: 2px solid #00ff00;
}

.notification.error {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #ffffff;
    border: 2px solid #ff4757;
}

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

@media (max-width: 1200px) {
    .tool-workspace {
        grid-template-columns: 1fr;
    }

    .form-panel {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2.5rem;
    }

    .tool-description {
        font-size: 1.1rem;
    }
}
