:root {
    --ios-blue: #007AFF;
    --ios-gray: #8E8E93;
    --ios-bg: #F2F2F7;
    --ios-card-bg: #FFFFFF;
    --ios-separator: #C6C6C8;
    --ios-folder-yellow: #FFD60A;
    /* iOS Folder Color */
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--ios-bg);
    color: #000;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ios-status-bar {
    height: 44px;
    background-color: var(--ios-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
}

.status-icons i {
    margin-left: 5px;
    font-size: 12px;
}

.app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.files-header {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--ios-bg);
}

.files-header h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.back-btn,
.more-btn {
    border: none;
    background: none;
    color: var(--ios-blue);
    font-size: 17px;
    cursor: pointer;
    font-weight: 400;
}

.search-bar-container {
    padding: 0 16px 10px;
    background-color: var(--ios-bg);
}

.search-bar {
    background-color: #E3E3E8;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    color: var(--ios-gray);
}

.search-bar i {
    margin-right: 8px;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 17px;
}

/* Breadcrumb Styles */
.breadcrumb-bar {
    padding: 5px 16px 10px;
    background-color: var(--ios-bg);
    display: flex;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.breadcrumb-item {
    color: var(--ios-blue);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.breadcrumb-item:last-child {
    color: #000;
    font-weight: 600;
    cursor: default;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--ios-gray);
    font-size: 12px;
}

.file-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-gap: 20px;
    align-content: start;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.file-icon {
    width: 60px;
    height: 80px;
    background-color: var(--ios-card-bg);
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    color: var(--ios-blue);
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.file-icon.folder {
    background-color: transparent;
    box-shadow: none;
    font-size: 60px;
    height: 60px;
    margin-bottom: 28px;
    /* Adjust to align with file icons */
    color: var(--ios-folder-yellow);
}

.file-name {
    font-size: 13px;
    color: #000;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 11px;
    color: var(--ios-gray);
    margin-top: 2px;
}

.bottom-tab-bar {
    height: 83px;
    /* Includes home bar area */
    background-color: rgba(249, 249, 249, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--ios-separator);
    display: flex;
    justify-content: space-around;
    padding-top: 10px;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: var(--ios-gray);
    cursor: pointer;
}

.tab-item.active {
    color: var(--ios-blue);
}

.tab-item i {
    font-size: 24px;
    margin-bottom: 4px;
}

/* Modal/Preview styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 14px;
    width: 80%;
    max-width: 400px;
    text-align: center;
}

.download-progress {
    width: 100%;
    height: 6px;
    background: #eee;
    margin: 15px 0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--ios-blue);
    width: 0%;
    transition: width 0.3s;
}