:root {
    --primary-color: #405DE6;
    --secondary-color: #5B51D8;
    --gradient-1: #833AB4;
    --gradient-2: #C13584;
    --gradient-3: #E1306C;
    --white: #FFFFFF;
    --gray: #f0f0f0;
    --dark: #1a1a1a;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--dark);
    color: var(--white);
    font-family: 'Poppins', sans-serif;
}

.header {
    background: var(--primary-color);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.container {
    display: flex;
    gap: 40px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.preview-section {
    flex: 1;
    min-width: 400px;
}

.controls-section {
    flex: 1;
    min-width: 400px;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.text-controls {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

#logoCapture {
    background: transparent;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-preview {
    width: 400px;
    height: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0; /* square by default */
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.logo-preview.circle {
    border-radius: 50%;
}

.logo-preview.rounded {
    border-radius: 20%;
}

#backgroundLayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    background-size: cover;
    background-position: center;
    border-radius: inherit; /* This makes the background layer inherit the border-radius */
}

.watermark {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 14px;
    opacity: 0.7;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.control-group {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
}

.control-group h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2em;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--white);
}

input[type="text"],
input[type="number"],
input[type="file"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-family: 'Poppins', sans-serif;
}

/* Text styling components */
.font-preview {
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.font-preview:hover {
    background: var(--primary-color);
}

.text-effects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.effect-option {
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.effect-option.active {
    background: var(--primary-color);
}

.color-picker-text {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.text-alignment {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.alignment-option {
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    text-align: center;
}

.alignment-option.active {
    background: var(--primary-color);
}

.spacing-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.spacing-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.text-shadow-controls {
    margin-top: 15px;
}

.shadow-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.shadow-preset {
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
}

.shadow-preset.active {
    background: var(--primary-color);
}
/* Shape and color controls */
.shape-picker {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.shape-option {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.shape-option.square {
    border-radius: 0;
}

.shape-option.circle {
    border-radius: 50%;
}

.shape-option.rounded {
    border-radius: 20%;
}

.shape-option.selected {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.color-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.color-option {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* Icon picker */
.icon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.icon-option {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.icon-option:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Action buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-preview {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Loading state */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    z-index: 1000;
}

.loading.active {
    display: flex;
}

/* Pro features section */
.pro-features {
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.pro-features h3 {
    color: white;
    margin-bottom: 15px;
}

.pro-features ul {
    list-style: none;
}

.pro-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pro-features i {
    color: var(--white);
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .logo-preview {
        width: 300px;
        height: 300px;
    }
}
