/* Modern Jewelry Wizard CSS */
:root {
    --primary-color: #4A6A58;
    --primary-dark: #3A5248;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #bdc3c7;
    --background: #f8f9fa;
    --surface: #ffffff;
    --border: #e9ecef;
    --border-light: #f1f3f4;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --gradient-primary: linear-gradient(135deg, #4A6A58, #5A7A68);
    --gradient-surface: linear-gradient(135deg, #ffffff, #f8f9fa);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.jewelry-wizard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 15px;
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 33.33%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
    color: var(--success-color);
}

.step i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.step.active i {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1);
}

.step.completed i {
    background: var(--success-color);
    color: white;
}

.step span {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* Wizard Steps */
.wizard-step {
    display: none;
    flex: 1;
    animation: fadeIn 0.5s ease;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    text-align: center;
    margin-bottom: 15px;
}

.step-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.step-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-card:hover::before {
    opacity: 0.1;
}

.category-card.selected {
    border-color: var(--primary-color);
    background: var(--gradient-surface);
    box-shadow: var(--shadow-md);
}

.category-card.selected::before {
    opacity: 0.1;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    position: relative;
    z-index: 1;
}

.category-icon i {
    font-size: 20px;
    color: white;
}

.category-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.category-card p {
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* Options Container */
.options-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.option-group {
    margin-bottom: 10px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-group label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

/* Radio Groups */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    padding: 10px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    margin-bottom: 0;
}

.radio-group label:hover {
    border-color: var(--primary-color);
    background: var(--gradient-surface);
}

.radio-group input[type="radio"]:checked + label {
    border-color: var(--primary-color);
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.02);
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.color-option.selected {
    border-color: var(--primary-color);
    background: var(--gradient-surface);
}

.color-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.color-circle.white { background: #ffffff; }
.color-circle.black { background: #000000; }
.color-circle.blue { background: #3498db; }
.color-circle.pink { background: #e91e63; }
.color-circle.red { background: #e74c3c; }
.color-circle.green { background: #27ae60; }
.color-circle.purple { background: #9b59b6; }

.color-option span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Form Elements */
textarea, input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Loading Animation */
.loading-container {
    text-align: center;
    padding: 30px 20px;
}

.jewelry-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.gem {
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.gem:nth-child(1) { animation-delay: -0.32s; }
.gem:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.loading-text {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 30px;
}

/* Loading Progress Bar Styles */
.loading-progress {
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.progress-container-loading {
    text-align: center;
}

.progress-bar-loading {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

#progressBar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #5A7A68);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-time {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

#progressText {
    color: var(--primary-color);
    font-weight: 600;
}

/* Result Container */
.result-container {
    text-align: center;
}

.result-container h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.result-image {
    max-width: 500px;
    margin: 0 auto 30px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.result-image img {
    width: 100%;
    height: auto;
    display: block;
}

.result-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

/* Navigation */
.wizard-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    gap: 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: var(--gradient-surface);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #229954;
}

/* Geri Butonu Özel Stilleri */
#prevBtn {
    background: var(--surface);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

#prevBtn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Tasarımı Oluştur Butonu Özel Stili */
#generateBtn {
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    color: white;
    border: 2px solid transparent;
    font-weight: 700;
    font-size: 16px;
    padding: 15px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

#generateBtn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
}

#generateBtn i {
    margin-right: 8px;
}

/* Modal Styles */
.order-modal, .share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Order Modal Specific Styles */
.order-info {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--background);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.order-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 106, 88, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* Share Modal Specific Styles */
.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.share-btn {
    padding: 15px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
}

.share-btn i {
    font-size: 20px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.whatsapp:hover {
    background: #1fb855;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.facebook:hover {
    background: #166fe5;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.twitter:hover {
    background: #1991db;
}

.share-btn.email {
    background: var(--text-secondary);
}

.share-btn.email:hover {
    background: var(--text-primary);
}

.share-btn.copy {
    background: var(--primary-color);
}

.share-btn.copy:hover {
    background: var(--primary-dark);
}

/* Responsive Modal Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px 20px;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .share-btn {
        padding: 12px 15px;
        font-size: 12px;
    }
    
    .share-btn i {
        font-size: 18px;
    }
      .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Result actions responsive */
    .result-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .jewelry-wizard {
        padding: 15px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    .color-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .wizard-navigation {
        flex-direction: column;
        gap: 15px;
    }
      .result-actions {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 100%;
    }
    
    .step-header h2 {
        font-size: 24px;
    }
    
    .progress-steps {
        gap: 10px;
    }
    
    .step span {
        display: none;
    }
}

@media (max-width: 480px) {
    .iframe-app {
        padding: 12px;
    }
    
    .design-form {
        padding: 20px;
    }
    
    .mail-modal-content {
        padding: 20px;
        margin: 16px;
    }
    
    .quick-fix-buttons {
        justify-content: center;
    }
    
    .notification {
        right: 16px;
        left: 16px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

#loadingOverlay {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Rotation Controls */
.rotation-controls {
    margin: 25px 0;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.rotation-controls h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-align: center;
}

.rotation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    justify-content: center;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline:active {
    transform: translateY(0);
}

/* Image rotation transform */
#generatedImage {
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.rotated-90 {
    transform: rotate(90deg);
}

.rotated-180 {
    transform: rotate(180deg);
}

.rotated-270 {
    transform: rotate(270deg);
}

/* Responsive adjustments for rotation controls */
@media (max-width: 768px) {
    .rotation-buttons {
        gap: 8px;
    }
    
    .btn-outline {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .rotation-controls {
        margin: 20px 0;
        padding: 15px;
    }
    
    .rotation-controls h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
}
