:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --background: #f9fafb;
    --surface: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Flash Messages */
.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.flash {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background-color: var(--success-color);
    color: white;
}

.flash-error {
    background-color: var(--danger-color);
    color: white;
}

.flash-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    opacity: 0.8;
}

.flash-close:hover {
    opacity: 1;
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Login Page */
.login-container {
    background: var(--surface);
    border-radius: 16px;
    padding: 48px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.logo {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.login-container h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-form {
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.info-box {
    background: var(--background);
    border-radius: 8px;
    padding: 20px;
    font-size: 14px;
}

.info-box strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.info-box ul {
    list-style: none;
    color: var(--text-secondary);
}

.info-box li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.info-box li:before {
    content: "•";
    position: absolute;
    left: 6px;
    color: var(--primary-color);
}

.stats-box {
    margin-top: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: white;
}

.stats-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.stats-box .stat-number {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.2s;
}

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

.btn-icon.btn-danger:hover {
    color: var(--danger-color);
    background-color: #fee2e2;
}

/* Workspace */
.workspace-container {
    min-height: 100vh;
    background-color: var(--background);
}

.workspace-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workspace-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    color: var(--text-primary);
}

.workspace-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-secondary);
}

/* Actions Bar */
.actions-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

/* Folders */
.folders-section {
    margin-bottom: 40px;
}

.folders-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.folder-item {
    position: relative;
}

.folder-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.folder-link:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.folder-link svg {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.folder-name {
    font-weight: 500;
    text-align: center;
    word-break: break-word;
}

.folder-item .delete-form {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Files */
.files-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.files-table {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.files-table table {
    width: 100%;
    border-collapse: collapse;
}

.files-table thead {
    background: var(--background);
}

.files-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.files-table td {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.files-table tbody tr {
    transition: background-color 0.2s;
}

.files-table tbody tr:hover {
    background-color: var(--background);
}

/* Sortable headers */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.sortable:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.sort-icon {
    margin-left: 8px;
    opacity: 0.5;
    font-size: 12px;
}

/* Drag and Drop */
.file-row {
    cursor: move;
}

.file-row.dragging {
    opacity: 0.5;
}

.drop-zone {
    position: relative;
    transition: all 0.3s;
}

.drop-zone.drag-over {
    background-color: rgba(59, 130, 246, 0.1);
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.drop-zone.drag-over::after {
    content: '📁 Buraya bırak';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 24px;
    background-color: var(--background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 12px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.file-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.file-name svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.actions {
    display: flex;
    gap: 8px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--surface);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

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

.modal-content form {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 32px 24px;
    }

    .workspace-content {
        padding: 20px 12px;
    }

    .folders-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .files-table {
        overflow-x: auto;
    }

    .actions-bar {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile-friendly touch targets */
    .btn-icon {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
        margin: 0 4px;
    }
    
    .btn-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .actions {
        display: flex;
        gap: 4px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    /* Make table more readable on mobile */
    .files-table td {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .files-table th {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    /* Hide sort icons on mobile */
    .sort-icon {
        display: none;
    }
}
