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

:root {
    --color-start: #667eea;
    --color-end: #764ba2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--color-start) 0%, var(--color-end) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.upload-section {
    text-align: center;
    padding: 40px 0;
}

.upload-hint {
    margin-top: 15px;
    color: #999;
    font-size: 0.95em;
}

.upload-btn {
    background: linear-gradient(135deg, var(--color-start) 0%, var(--color-end) 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.editor-section {
    animation: fadeIn 0.5s ease-in;
}

.change-photo-section {
    text-align: center;
    margin-bottom: 20px;
}

.change-photo-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.change-photo-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

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

.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px;
}

/* Maintain 1:1 aspect ratio */
.canvas-wrapper::before {
    content: "";
    display: block;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

.canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: move;
}

#frameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.controls {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

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

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.control-group input[type="color"] {
    width: 100%;
    height: 45px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
}


.app-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.admin-link {
    color: #999;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.admin-link:hover {
    color: #667eea;
}

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

.btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-start) 0%, var(--color-end) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

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

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    header h1 {
        font-size: 2em;
    }

    header p {
        font-size: 1em;
    }

    .canvas-wrapper {
        max-width: 350px;
    }

    .controls {
        padding: 20px;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.75em;
    }

    header p {
        font-size: 0.95em;
    }

    .canvas-wrapper {
        max-width: 280px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        padding: 12px 24px;
    }

    .controls {
        padding: 15px;
    }
}

