/* css/custom.css */
/* Custom styles for InfoPlatform app */

:root {
    --app-primary: #0A84FF;
    --app-secondary: #34C759;
    --app-tertiary: #FF9500;
    --app-quaternary: #FF2D55;
    --app-background: #F2F2F7;
    --app-card-background: #FFFFFF;
    --app-text-primary: #000000;
    --app-text-secondary: #3C3C43;
    --app-text-tertiary: #8E8E93;
    --app-border-color: #C6C6C8;
    --app-success: #34C759;
    --app-warning: #FF9500;
    --app-error: #FF3B30;
    --app-info: #5AC8FA;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* iPhone 15 Pro specific styling */
#phone-container {
    margin: 0 auto;
}

#phone-frame {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
}

/* Status bar styling */
#status-bar {
    background: transparent;
}

/* Tab bar styling */
#tab-bar {
    border-top: 1px solid var(--app-border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tab-item {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.tab-item:active, .tab-item.active {
    background-color: rgba(0, 0, 0, 0.05);
}

.tab-item.active i, .tab-item.active span {
    color: var(--app-primary);
}

/* Content card styling */
.content-card {
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--app-card-background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

/* Button styling */
.ios-button {
    background-color: var(--app-primary);
    color: white;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 17px;
    transition: all 0.2s ease;
}

.ios-button:active {
    opacity: 0.7;
    transform: scale(0.98);
}

.ios-button.secondary {
    background-color: rgba(10, 132, 255, 0.1);
    color: var(--app-primary);
}

/* Settings item styling */
.settings-item {
    padding: 16px;
    border-bottom: 1px solid var(--app-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* iOS style switch */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e9e9ea;
    transition: .4s;
    border-radius: 34px;
}

.ios-switch-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ios-switch input:checked + .ios-switch-slider {
    background-color: var(--app-success);
}

.ios-switch input:checked + .ios-switch-slider:before {
    transform: translateX(20px);
}

/* Animation for page transitions */
.page-transition {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Category pill styling */
.category-pill {
    background-color: rgba(10, 132, 255, 0.1);
    color: var(--app-primary);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Reading progress bar */
.reading-progress {
    height: 3px;
    background-color: var(--app-primary);
    transition: width 0.3s ease;
}

/* iOS input styling */
.ios-input {
    background-color: rgba(142, 142, 147, 0.12);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 17px;
    border: none;
    outline: none;
    width: 100%;
}

.ios-input:focus {
    background-color: rgba(142, 142, 147, 0.18);
}

/* Special animation for search bar */
.search-animation {
    transition: all 0.3s ease;
}

.search-active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* For article content in dark mode */
.dark-mode {
    --app-background: #000000;
    --app-card-background: #1C1C1E;
    --app-text-primary: #FFFFFF;
    --app-text-secondary: #EBEBF5;
    --app-text-tertiary: #8E8E93;
    --app-border-color: #38383A;
}

/* For the immersive reading experience */
.immersive-reading {
    background-color: var(--app-background);
    padding: 20px;
    line-height: 1.6;
}

.immersive-reading p {
    margin-bottom: 1.2em;
    font-size: 18px;
    color: var(--app-text-primary);
}

.immersive-reading h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

/* Dynamic category bubbles */
.category-bubble {
    background-color: var(--app-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.2);
    transition: all 0.3s ease;
}

.category-bubble:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(10, 132, 255, 0.1);
}