:root {
    --bg: #0a0a0f;
    --bg2: #111118;
    --glass: rgba(17, 17, 24, .9);
    --text: #fff;
    --text2: #888;
    --accent: #10b981;
    --accent2: #34d399;
    --gradient: linear-gradient(135deg, #10b981, #34d399);
    --border: rgba(255, 255, 255, .08);
    --radius: 14px
}

[data-theme=light] {
    --bg: #f0fdf4;
    --bg2: #fff;
    --glass: rgba(255, 255, 255, .95);
    --text: #1a1a2e;
    --text2: #64748b;
    --border: rgba(0, 0, 0, .1)
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--glass);
    border-bottom: 1px solid var(--border)
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem
}

.logo h1 {
    font-size: 1.3rem;
    font-weight: 400
}

.logo h1 span {
    font-weight: 700;
    color: var(--accent)
}

.header-actions {
    display: flex;
    gap: 10px
}

#theme-btn {
    width: 40px;
    height: 40px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer
}

.export-btn {
    padding: 10px 20px;
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: .2s
}

.export-btn:hover {
    transform: scale(1.05)
}

.editor-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    flex: 1;
    overflow: hidden
}

.form-panel {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 70px)
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px
}

.form-section h3 {
    font-size: .95rem;
    margin-bottom: 14px
}

.form-section input,
.form-section textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: .9rem;
    margin-bottom: 10px;
    resize: none
}

.form-section input:focus,
.form-section textarea:focus {
    outline: none;
    border-color: var(--accent)
}

.add-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--accent);
    font-size: .9rem;
    cursor: pointer;
    transition: .2s
}

.add-btn:hover {
    border-color: var(--accent);
    background: rgba(16, 185, 129, .1)
}

.entry-item {
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
    margin-bottom: 10px;
    position: relative
}

.entry-item input {
    margin-bottom: 8px
}

.entry-item textarea {
    min-height: 60px
}

.delete-entry {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    font-size: 1rem
}

.delete-entry:hover {
    color: #ef4444
}

.preview-panel {
    padding: 20px;
    overflow-y: auto;
    background: var(--bg2);
    max-height: calc(100vh - 70px)
}

.template-picker {
    display: flex;
    gap: 8px;
    margin-bottom: 16px
}

.tpl-btn {
    padding: 8px 16px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text2);
    font-size: .85rem;
    cursor: pointer;
    transition: .2s
}

.tpl-btn:hover {
    border-color: var(--accent)
}

.tpl-btn.active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent
}

.resume-preview {
    background: #fff;
    color: #1a1a2e;
    padding: 40px;
    min-height: 800px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .3)
}

.resume-preview.modern {
    font-family: 'Inter', sans-serif
}

.resume-preview.modern .r-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 16px;
    margin-bottom: 20px
}

.resume-preview.modern .r-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a2e
}

.resume-preview.modern .r-title {
    color: var(--accent);
    font-weight: 500
}

.resume-preview.modern .r-contact {
    text-align: right;
    font-size: .85rem;
    color: #555
}

.resume-preview.modern .r-section {
    margin-bottom: 20px
}

.resume-preview.modern .r-section h4 {
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    margin-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 4px
}

.resume-preview.modern .r-exp-item {
    margin-bottom: 14px
}

.resume-preview.modern .r-exp-title {
    font-weight: 600
}

.resume-preview.modern .r-exp-company {
    color: #555;
    font-size: .9rem
}

.resume-preview.modern .r-exp-date {
    font-size: .8rem;
    color: #888
}

.resume-preview.modern .r-exp-desc {
    font-size: .85rem;
    color: #333;
    margin-top: 4px
}

.resume-preview.modern .r-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.resume-preview.modern .r-skill {
    padding: 4px 12px;
    background: #f0fdf4;
    color: var(--accent);
    border-radius: 20px;
    font-size: .8rem
}

.resume-preview.classic {
    font-family: Georgia, serif
}

.resume-preview.classic .r-header {
    text-align: center;
    margin-bottom: 24px
}

.resume-preview.classic .r-name {
    font-size: 2rem;
    font-weight: normal
}

.resume-preview.classic .r-title {
    font-style: italic;
    margin-top: 4px
}

.resume-preview.classic .r-contact {
    margin-top: 10px;
    font-size: .85rem;
    color: #555
}

.resume-preview.classic .r-section h4 {
    font-size: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
    margin-bottom: 10px
}

.resume-preview.minimal {
    font-family: 'Inter', sans-serif;
    padding: 30px
}

.resume-preview.minimal .r-header {
    margin-bottom: 20px
}

.resume-preview.minimal .r-name {
    font-size: 1.5rem;
    font-weight: 600
}

.resume-preview.minimal .r-section h4 {
    font-weight: 600;
    margin-bottom: 8px
}

.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(16, 185, 129, .3);
    z-index: 10
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg2);
    border: 1px solid var(--accent);
    padding: 12px 20px;
    border-radius: 12px;
    opacity: 0;
    transition: .3s;
    z-index: 100
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}

@media(max-width:900px) {
    .editor-layout {
        grid-template-columns: 1fr
    }

    .preview-panel {
        display: none
    }
}