
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 0;
}

header {
    background-color: #3f51b5;
    color: white;
    padding: 20px;
    text-align: center;
}

footer {
    background-color: #3f51b5;
    color: white;
    text-align: center;
    padding: 15px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

h2 {
    margin-top: 0;
    color: #333;
}

form label {
    font-weight: bold;
}

form input, form select {
    padding: 8px;
    width: 100%;
    margin: 10px 0 20px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background: #3f51b5;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #303f9f;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.gallery {
    margin-top: 40px;
}

.gallery h3 {
    margin-bottom: 10px;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.gallery-item {
    width: 120px;
    background: #fafafa;
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.gallery-item p {
    margin: 8px 0 0;
    font-size: 13px;
    color: #555;
}
.crop-modal .modal-content {
    background-color: #1e1e2f;
    color: #fff;
    border-radius: 8px;
    border: 1px solid #444;
}

.crop-modal .modal-header {
    border-bottom: 1px solid #333;
    background-color: #2a2a3c;
}

.crop-modal .modal-title {
    font-weight: bold;
    font-size: 18px;
}

.crop-modal .btn-close {
    filter: invert(1);
}

.crop-modal .modal-body {
    display: flex;
    gap: 1rem;
}

.crop-preview {
    flex: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    padding: 10px;
    border-radius: 8px;
}

.crop-preview img {
    max-width: 100%;
    border-radius: 4px;
}

.crop-settings {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 5px 10px;
}

.crop-settings label {
    font-weight: 600;
    color: #ccc;
}

.crop-settings input,
.crop-settings select {
    background-color: #2e2e40;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 8px;
}

.crop-settings .form-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.crop-settings .btn {
    padding: 10px 20px;
    border-radius: 4px;
}

.crop-settings .btn-outline-secondary {
    background-color: #2e2e40;
    border: 1px solid #555;
    color: #ccc;
}

.crop-settings .btn-primary {
    background-color: #4a90e2;
    border: none;
}

.image-wrapper {
    position: relative;
    background-color: #111;
    border-bottom: 1px solid #333;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #333;
    border-radius: 0;
}

.image-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
}

.image-actions button {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 50%;
    font-size: 14px;
    transition: background 0.2s ease;
}

.image-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-size {
    padding: 8px;
    font-size: 13px;
    text-align: center;
    background: #1e1e2f;
    color: #aaa;
}
.img-card {
    width: 200px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.img-preview-wrapper {
    position: relative;
    background: #f9f9f9;
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-thumb {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.img-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.img-actions button {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    padding: 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.img-actions button:hover {
    background-color: #eaeaea;
}

.img-meta {
    padding: 8px;
    font-size: 13px;
    text-align: center;
    background: #fefefe;
    border-top: 1px solid #eee;
}

.filename {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.img-dim {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}
.image-actions button[title] {
    position: relative;
    cursor: pointer;
}

.image-actions button[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.image-actions button[title]:hover::before {
    content: "";
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #000 transparent transparent transparent;
    z-index: 101;
}