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

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gray-color: #e9ecef;
    --danger-color: #e63946;
    --success-color: #2a9d8f;
    --border-radius: 8px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f1f3f5;
    min-height: 100vh;
    padding: 30px;
    color: var(--dark-color);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-color);
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background-color: var(--gray-color);
}

.btn i {
    font-size: 16px;
}

.editor-container {
    display: flex;
    gap: 30px;
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-height: 700px;
}

.input-section {
    flex: 1;
    padding: 25px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    max-width: 450px;
}

.preview-section {
    flex: 2;
    padding: 25px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

h2 {
    margin-bottom: 25px;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 14px;
}

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    background-color: white;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed #ddd;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    background-color: white;
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-group input {
    flex: 1;
    margin-bottom: 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
    font-weight: normal;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.position-inputs {
    display: flex;
    gap: 15px;
}

.position-inputs label {
    flex: 1;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.button-group button {
    flex: 1;
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button:hover {
    background-color: var(--secondary-color);
}

#copyBtn {
    background-color: var(--dark-color);
}

#copyBtn:hover {
    background-color: #343a40;
}

#imageMaker {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: 2px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.divider {
    display: flex;
    align-items: center;
    margin: 15px 0;
    color: #adb5bd;
    font-size: 14px;
}

.divider:before,
.divider:after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.divider:before {
    margin-right: 10px;
}

.divider:after {
    margin-left: 10px;
}

/* Resim Kütüphanesi ve Modal Stilleri */
.secondary-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 12px;
    font-size: 14px;
}

.secondary-btn:hover {
    background-color: #3ab7dc;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 80%;
    max-width: 1000px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.modal-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 18px;
}

.close-modal {
    color: var(--dark-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid #dee2e6;
}

.modal-footer button {
    width: auto;
    padding: 10px 20px;
}

.modal-footer button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}

#closeModalBtn {
    background-color: #6c757d;
}

#closeModalBtn:hover {
    background-color: #5a6268;
}

.library-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 400px;
}

.search-container input {
    margin-bottom: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-container button {
    width: auto;
    padding: 12px 15px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.upload-container {
    flex: 1;
    text-align: right;
}

.upload-btn {
    display: inline-block;
    background-color: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.upload-btn:hover {
    background-color: #248277;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    min-height: 300px;
}

.library-item {
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    aspect-ratio: 1/1;
    background-color: var(--gray-color);
}

.library-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.library-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.library-item.selected {
    border-color: var(--primary-color);
}

.library-item .image-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    font-size: 12px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-item .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(230, 57, 70, 0.7);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.library-item:hover .delete-btn {
    opacity: 1;
}

.library-item .delete-btn:hover {
    background: rgba(230, 57, 70, 1);
}

.library-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.library-pagination button {
    width: auto;
    padding: 8px 12px;
}

.library-pagination button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}

.format-info {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.empty-library {
    text-align: center;
    padding: 50px 0;
    color: #6c757d;
}

.empty-library i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Etiketler bölümü için stil */
#hashTags {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 12px;
    width: 100%;
    min-height: 80px;
    resize: vertical;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    transition: var(--transition);
}

#hashTags:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Responsive styling */
@media screen and (max-width: 992px) {
    .editor-container {
        flex-direction: column;
    }
    
    .input-section {
        max-width: 100%;
    }
    
    .library-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-content {
        width: 95%;
    }
}

@media screen and (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        padding: 8px 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .library-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-container {
        width: 100%;
    }
    
    .upload-container {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .editor-container {
        padding: 15px;
    }
    
    .input-section,
    .preview-section {
        padding: 15px;
    }
    
    .position-inputs {
        flex-direction: column;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 10px;
    }
    
    .library-grid {
        grid-template-columns: repeat(2, 1fr);
    }
} 