* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --success: #2ec4b6;
    --warning: #ff9f1c;
    --danger: #e71d36;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

header h1 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 2.8rem;
}

header p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}

.controls-panel {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.preview-panel {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.section-title {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.5rem;
}

.control-group {
    margin-bottom: 25px;
}

.control-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container input[type="range"] {
    flex: 1;
}

.value-display {
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    background: #f8f9fa;
    padding: 5px;
    border-radius: 5px;
}

.border-radius-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.border-radius-control {
    display: flex;
    flex-direction: column;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.color-picker {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e0e0e0;
}

.color-picker input {
    width: 100%;
    height: 100%;
    border: none;
    cursor: pointer;
}

.border-style-select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.border-style-select:focus {
    outline: none;
    border-color: var(--primary);
}

.border-style-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.border-style-option {
    padding: 8px 15px;
    border-radius: 8px;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.border-style-option:hover {
    border-color: var(--accent);
}

.border-style-option.active {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.1);
    font-weight: 600;
}

.preview-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%),
                linear-gradient(-45deg, #f8f9fa 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f8f9fa 75%),
                linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 15px;
    margin-bottom: 25px;
    min-height: 350px;
}

#preview-element {
    width: 250px;
    height: 250px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.preview-text {
    color: var(--gray);
    font-weight: 600;
    text-align: center;
}

.code-output {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.5;
    overflow-x: auto;
    margin-top: 10px;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.copy-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background-color: var(--secondary);
}

.copy-btn.copied {
    background-color: var(--success);
}

.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

.secondary-btn {
    background-color: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.secondary-btn:hover {
    background-color: #f8f9fa;
    transform: translateY(-3px);
}

.presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .presets {
        grid-template-columns: repeat(2, 1fr);
    }
}

.preset {
    height: 80px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-weight: 600;
}

.preset:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

.css-property {
    color: #9cdcfe;
}

.css-value {
    color: #ce9178;
}

.css-selector {
    color: #d7ba7d;
}