/* --- LAYOUT --- */
.tool-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    margin: 30px 0;
}

/* --- EDITOR (LEFT) --- */
.editor-section {
    flex: 1;
    min-width: 300px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.toolbar button {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: #f8f8f8;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}
.toolbar button:hover { background: #eef; border-color: #aaf; }

.spacer-btn {
    width: auto !important;
    padding: 0 10px;
    font-size: 12px !important;
    font-weight: 600;
    color: #E1306C;
}

textarea#bioInput {
    width: 100%;
    height: 180px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.toggle-tick {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #0095f6;
    font-weight: 600;
}

#charCount { font-size: 12px; color: #666; font-weight: bold; }
.char-limit-exceeded { color: #d93025 !important; }

.copy-btn {
    width: 100%;
    background: #0095f6;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
}
.copy-btn:hover { background: #0081d6; }

#copyMsg {
    color: #1e8e3e; 
    font-size: 13px; 
    margin-top: 10px; 
    text-align: center; 
    font-weight: 600;
}

/* --- IPHONE MOCKUP (RIGHT) --- */
.preview-section {
    flex: 0 0 320px;
}

.iphone-mockup {
    width: 300px;
    height: 580px;
    background: #fff;
    border: 12px solid #333;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.notch {
    width: 120px;
    height: 25px;
    background: #333;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 2;
}

.screen {
    padding: 45px 15px 15px 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.insta-header {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #efefef;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-area {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.pic-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-radius: 50%;
    margin-right: 20px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #fff inset;
}

.stats-row {
    display: flex;
    gap: 15px;
    text-align: center;
    font-size: 12px;
}
.stat strong { font-size: 16px; display: block; }

.bio-display {
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap; /* MAGIC: Keeps line breaks */
    color: #262626;
    margin-bottom: 15px;
}

.action-buttons { display: flex; gap: 10px; }
.p-btn {
    flex: 1;
    background: #efefef;
    text-align: center;
    padding: 6px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: default;
}
.primary { background: #0095f6; color: white; }