:root {
    --bg-color: #000000;
    --control-bg: rgba(30, 30, 30, 0.8);
    --accent-color: #007AFF;
    --text-color: #FFFFFF;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent scrolling */
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
}

.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.view.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* Camera View */
#camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Editor View */
.canvas-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    width: 100%;
    height: 100%;
}

:root {
    --bg-color: #000000;
    --control-bg: rgba(30, 30, 30, 0.8);
    --accent-color: #007AFF;
    --text-color: #FFFFFF;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent scrolling */
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
}

.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.view.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* Camera View */
#camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Editor View */
.canvas-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    width: 100%;
    height: 100%;
}

#photo-canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#text-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    max-width: 90%;
    word-wrap: break-word;
    pointer-events: none;
    /* Allow clicks to pass through to canvas if needed, but children need auto */
}

.draggable-text {
    pointer-events: auto;
    /* Enable interaction for text elements */
}

.draggable-text.selected {
    border-color: var(--accent-color);
    background-color: rgba(0, 0, 0, 0.3);
}

/* Controls */
.controls-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 20px;
    gap: 20px;
    z-index: 10;
}

.editor-controls {
    background: var(--control-bg);
    backdrop-filter: blur(10px);
    height: 100px;
    padding-bottom: 0;
    /* Centered vertically */
}

/* Buttons */
button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: transform 0.1s;
}

button:active {
    transform: scale(0.95);
}

.btn-primary-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shutter-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 16px;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 16px;
}

/* Text Input Toolbar */
#text-controls {
    position: absolute;
    bottom: 110px;
    /* Above bottom controls */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background-color: rgba(40, 40, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

#text-controls.hidden {
    display: none;
}

#text-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
}

#text-input:focus {
    outline: 2px solid var(--accent-color);
}

.btn-text {
    background-color: var(--accent-color);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 16px;
    align-self: flex-end;
}