/* ========================================
 * MOBILE & TABLET RESPONSIVE STYLES
 * ========================================
 * Αυτό το αρχείο περιέχει όλα τα responsive
 * styles για κινητά και tablets
 */

/* ========================================
 * TABLET STYLES (768px - 1024px)
 * ======================================== */
@media (max-width: 1024px) {
    .container {
        padding: 30px 20px;
    }

    .dashboard-header h1 {
        font-size: 32px;
    }

    .dashboard-header p {
        font-size: 16px;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }

    .upload-section,
    .files-section {
        padding: 35px;
    }

    .account-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .navbar {
        padding: 18px 30px;
    }

    .navbar-brand {
        font-size: 22px;
    }

    .form-container {
        width: 90%;
        max-width: 500px;
        transform: scale(1.2);
    }

    .title {
        font-size: 1.85rem;
    }
}

/* ========================================
 * MOBILE STYLES (max-width: 768px)
 * ======================================== */
@media (max-width: 768px) {
    /* Auth Pages - Mobile */
    .auth-card {
        padding: 30px 20px;
        max-width: 100%;
        margin: 10px;
    }

    .auth-header h1 {
        font-size: 28px;
    }

    .auth-header p {
        font-size: 14px;
    }

    .form-container {
        transform: scale(1);
        width: 95%;
        max-width: 400px;
        padding: 2rem 1.5rem;
        margin: 10px;
    }

    .title-wrapper {
        gap: 12px;
    }

    .title {
        font-size: 1.75rem;
        letter-spacing: -0.3px;
    }

    .title-icon i {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .input-group {
        margin-bottom: 1.25rem;
    }

    .input-group input {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .input-group label {
        font-size: 0.95rem;
    }

    .sign,
    .btn-secondary {
        padding: 0.875rem;
        font-size: 1rem;
    }

    /* Navbar - Mobile */
    .navbar {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .navbar-brand {
        font-size: 20px;
        text-align: center;
    }

    .navbar-menu {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }

    .navbar-menu a {
        width: 100%;
        text-align: center;
        padding: 12px 18px;
    }

    /* Dashboard - Mobile */
    .container {
        padding: 20px 15px;
    }

    .dashboard-header {
        margin-bottom: 30px;
        text-align: center;
    }

    .dashboard-header h1 {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .dashboard-header p {
        font-size: 15px;
    }

    /* Breadcrumbs - Mobile */
    .breadcrumbs {
        padding: 12px 15px;
        font-size: 14px;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Upload Section - Mobile */
    .upload-section {
        padding: 25px 20px;
        margin-bottom: 30px;
        border-radius: 16px;
    }

    .upload-controls {
        flex-direction: column;
        gap: 12px;
    }

    .folder-input {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-create-folder {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    .upload-area {
        padding: 40px 20px;
        border-radius: 12px;
    }

    .upload-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }

    .upload-area h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .upload-area p {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .upload-btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    /* Files Section - Mobile */
    .files-section {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .files-section h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    /* Items Grid - Mobile */
    .items-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Folder & File Cards - Mobile */
    .folder-card,
    .file-card {
        padding: 20px;
        border-radius: 12px;
    }

    .folder-icon,
    .file-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .folder-name,
    .file-name {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .folder-info,
    .file-info {
        font-size: 13px;
        margin-bottom: 12px;
    }

    /* Action Buttons - Mobile */
    .folder-actions,
    .file-actions {
        flex-direction: column;
        gap: 10px;
    }

    .folder-actions button,
    .file-actions button,
    .folder-actions a,
    .file-actions a {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        justify-content: center;
    }

    .action-icon {
        font-size: 16px;
    }

    .action-text {
        font-size: 14px;
    }

    /* Table View - Mobile */
    .item-table {
        max-height: 50vh;
        border-radius: 12px;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        padding: 12px 15px;
        gap: 8px;
    }

    .table-header {
        display: none; /* Κρύβουμε τα headers στο mobile */
    }

    .table-row {
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 15px;
        background: rgba(255, 255, 255, 0.03);
    }

    .col-name {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .table-icon {
        font-size: 18px;
    }

    .col-size,
    .col-date {
        font-size: 12px;
        margin-bottom: 5px;
        display: block;
    }

    .col-size::before {
        content: "Size: ";
        font-weight: 600;
        color: var(--text-primary);
    }

    .col-date::before {
        content: "Modified: ";
        font-weight: 600;
        color: var(--text-primary);
    }

    .col-actions {
        margin-top: 10px;
        flex-direction: column;
        gap: 8px;
    }

    .col-actions a,
    .col-actions button {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
    }

    /* Account Page - Mobile */
    .account-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .info-card {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .info-card h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .info-card p {
        font-size: 14px;
    }

    .info-card .value {
        font-size: 28px;
    }

    /* File Preview - Mobile */
    .file-preview-card {
        padding: 25px 15px;
        border-radius: 16px;
        width: 95%;
    }

    .file-preview-card video,
    .file-preview-card img,
    .file-preview-card audio {
        max-height: 50vh;
        border-radius: 10px;
    }

    .custom-video-player {
        border-radius: 10px;
    }

    .video-controls {
        padding: 8px 12px;
        font-size: 13px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .video-controls button,
    .video-controls select {
        font-size: 14px;
        padding: 4px;
    }

    .video-controls input[type="range"].volume-range {
        width: 60px;
    }

    /* Modal - Mobile */
    .modal-card {
        width: 95%;
        max-width: 350px;
        padding: 20px 24px;
    }

    .modal-message {
        font-size: 15px;
        margin-bottom: 18px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .modal-btn {
        width: 100%;
        padding: 10px 18px;
        font-size: 15px;
    }

    /* Alerts - Mobile */
    .alert {
        padding: 14px 16px;
        font-size: 14px;
        gap: 10px;
    }

    .alert i {
        font-size: 1rem;
    }

    /* Empty State - Mobile */
    .empty-state {
        padding: 40px 20px;
    }

    .empty-state-icon {
        font-size: 60px;
        margin-bottom: 15px;
    }

    .empty-state h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }

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

    /* Plyr Player - Mobile */
    .plyr {
        border-radius: 10px;
        min-width: 100%;
    }

    .plyr__poster {
        border-radius: 10px !important;
    }

    /* Public Toggle - Mobile */
    .public-toggle {
        gap: 8px;
        font-size: 14px;
    }

    .public-toggle input[type="checkbox"] {
        width: 38px;
        height: 20px;
    }

    .public-toggle input[type="checkbox"]::before {
        width: 14px;
        height: 14px;
        left: 2px;
    }

    .public-toggle input[type="checkbox"]:checked::before {
        left: 22px;
    }
}

/* ========================================
 * SMALL MOBILE STYLES (max-width: 480px)
 * ======================================== */
@media (max-width: 480px) {
    /* Extra small screens */
    .form-container {
        padding: 1.75rem 1.25rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .title-icon i {
        font-size: 1.5rem;
    }

    .dashboard-header h1 {
        font-size: 22px;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .upload-section,
    .files-section {
        padding: 20px 15px;
    }

    .files-section h2 {
        font-size: 20px;
    }

    .folder-card,
    .file-card {
        padding: 18px;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .upload-icon {
        font-size: 40px;
    }

    .upload-area h3 {
        font-size: 18px;
    }

    .info-card .value {
        font-size: 24px;
    }

    .file-preview-card {
        padding: 20px 12px;
    }

    .modal-card {
        padding: 18px 20px;
    }
}

/* ========================================
 * LANDSCAPE ORIENTATION FIXES
 * ======================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-container {
        padding: 10px;
    }

    .form-container {
        padding: 1.5rem;
        margin: 5px;
    }

    .title {
        font-size: 1.5rem;
    }

    .input-group {
        margin-bottom: 1rem;
    }

    .input-group input {
        padding: 0.75rem 1rem;
    }

    .sign,
    .btn-secondary {
        padding: 0.75rem;
    }

    .upload-area {
        padding: 30px 20px;
    }

    .upload-icon {
        font-size: 40px;
        margin-bottom: 10px;
    }

    .file-preview-card video,
    .file-preview-card img {
        max-height: 60vh;
    }
}

/* ========================================
 * TOUCH DEVICE OPTIMIZATIONS
 * ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Μεγαλύτερα touch targets */
    .navbar-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .folder-actions button,
    .file-actions button,
    .folder-actions a,
    .file-actions a {
        min-height: 44px;
    }

    .btn {
        min-height: 44px;
    }

    .upload-btn {
        min-height: 44px;
    }

    .modal-btn {
        min-height: 44px;
    }

    /* Απενεργοποίηση hover effects σε touch devices */
    .folder-card:hover,
    .file-card:hover {
        transform: none;
    }

    .btn:hover::before {
        width: 0;
        height: 0;
    }

    /* Active states για καλύτερο feedback */
    .folder-card:active,
    .file-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    button:active,
    a:active {
        transform: scale(0.95);
    }
}

/* ========================================
 * ACCESSIBILITY IMPROVEMENTS
 * ======================================== */
@media (max-width: 768px) {
    /* Καλύτερη ευκολία ανάγνωσης */
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }

    /* Αποφυγή zooming σε inputs */
    input,
    select,
    textarea {
        font-size: 16px;
    }

    /* Καλύτερο spacing για touch */
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ========================================
 * PRINT STYLES
 * ======================================== */
@media print {
    .navbar,
    .upload-section,
    .folder-actions,
    .file-actions,
    .btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .glass-card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}